I want to plot a line from one well-defined point to another and then turn it into an image matrix to use a Gaussian filter on it for smoothing. For this I use the functions line and getframe to plot a line and capture the figure window in an image, but getframe is very slow and not very reliable. I noticed that it does not capture anyth...
I'm trying to export some data from MATLAB to a database. I use a PostgreSQL database via ODBC as follows. First, I create the connection:
dbConn = database('PostgreSQL30', username,password);
If I try to execute some test insertion manually, everything looks fine:
exec( dbConn, 'insert into test(std) values(2.2)')
When I try to g...
Hello;
I have yuv sequences and I want to convert it to bmp images.And I want to save it to folder on my computer.
I used yuv2bmp m file in http://www.mathworks.com/matlabcentral/fileexchange/25563-convert-420-yuv-to-bmp .
Altough Yuv file is 44MB, unfortunately Matlab gave memory error.
How can I overcome of this problem? Could you ...
Let's say I have a one-dimensional array:
a = [1, 2, 3];
Is there a built-in Matlab function that takes an array and an integer n and replicates each
element of the array n times?
For example calling replicate(a, 3) should return [1,1,1,2,2,2,3,3,3].
Note that this is not at all the same as repmat. I can certainly implement replica...
I manipulate data on a plot using its handle
x = 1:10; y = sin(x);
h1 = line(x,y);
However, if the figure gets closed before the script actually terminates, doing something like this returns an error.
>>set(h1,'Color','green') % line is green
??? Error using ==> set
Invalid handle object.
Is there a way to check if h1 is a valid h...
Is there any built-in functions in MATLAB that would statistically extend a sequence of real numbers so that the resulting sequence is extended to any size I want. I have a sequence of 499 elements and I want to extend it to 4096 elements. Thanks in advance.
...
How can I write a program to plot this expression:
(a*z^2+c)+(a*z^2-c)*cos(2*u+m*pi)+b*z*sin(2*u+m*pi)=0
Where all of "a","b","c" and "z" parameters are known expressions and are just one variable expressions:"beta". And you is an expression of "lambda", so the main equation is an implicit expression of(lambda and beta).
...
Suppose I have a function y(t,x) = exp(-t)*sin(x)
In Matlab, I define
t = [0: 0.5: 5];
x = [0: 0.1: 10*2*pi];
y = zeros(length(t), length(x)); % empty matrix init
Now, how do I define matrix y without using any loop, such that each element y(i,j) contains the value of desired function y at (t(i), x(j))? Below is how I did it using a ...
I have two clusters of data each cluster has x,y (coordinates) and a value to know it's type(1 class1,2 class 2).I have plotted these data but i would like to split these classes with boundary(visually). what is the function to do such thing. i tried contour but it did not help!
...
I want to know the simplest way to plot vectors in MATLAB.
For example:
a = [2 3 5];
b = [1 1 0];
c = a + b;
I want to visualize this vector addition as head-to-tail/parallelogram method. How do I plot these vectors with an arrow-head?
...
I know that Matlab allows for you to format the graph after its created through the interface. However there isn't the same features in Octave. Is there a tool that goes between Octave and GnuPlot? If there isn't such a tool, is there a tool that will generate the formatting options?
I've heard of EasyPlot, but it isn't free.
...
I was reading about MATLAB and I'm so much curious on it. But I have some questions:
Can I use it for anything except maths?
Can you list some examples with links to the full code?
I know that the name of the language is very subjective, but I want to show for all that these languages used only for maths and statictics can do power...
I have data for the y axis of a graph and I need to perform FFT on the data to receive a graph.
I don't have much experience with Matlab, any help will be very appreciated.
...
how can i change the horizontal and vertical axis of an ezplot of a symbolic equation?
for example an implicit equation of lambda & beta.
how MATLAB can understand what i want to be for x axis and what for y axis??
...
Hello,
After doing the hough transform in Matlab, how do I pick the lines so that I can compare between 2 or more images? Thanks.
I followed the example given by Amro below and actually what I wanted to detect is the 2 lines in the 1st picture however what I got is the one in the 2nd picture. Can anyone help? Thanks!
...
I'm trying to insert multiple values into an array using a 'values' array and a 'counter' array. For example, if:
a=[1,3,2,5]
b=[2,2,1,3]
I want the output of some function
c=somefunction(a,b)
to be
c=[1,1,3,3,2,5,5,5]
Where a(1) recurs b(1) number of times, a(2) recurs b(2) times, etc...
Is there a built-in function in MATLAB ...
I have a project in a course at the university that requires various Matlab functions. My version of Matlab is supplied by my workplace, and it doesn't have some of the toolboxes that are required for the project. Is there some repository of such implementations anywhere? I couldn't find anything relevant when I googled.
While my que...
I have some matlab code that will only run on 32 bit windows, but I need atleast 6 gb of ram to run it. In my lab the only machine that has 6gb ram is running 64 bit windows, is there some way to run this code on here?
I am thinking of emulating a 32 bit windows and running it on that, will that work?
...
I'm now learning a bit of MATLAB and I have two versions of it. Version 4.2c, that I use on my emulated Windows 3.11 and the lastest one, that I use on my Windows Vista.
Here is a screenshot of it:
Then I want to know:
What are the main differences?
There are any difference in the language itself?
New librarys will work?
...