COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

how to plot #3

• Email
• Follow

```y=ax+b format,in  this y is of 20by 20 matrix
plot with respect to time
but the command window shows like below
pls help me to solve this
time span is
t=linspace(0,0.12,10)

Error using ==> plot
Vectors must be the same lengths.
```
 0
Reply vignesh_tooling (14) 7/31/2012 7:27:13 AM

See related articles to this posting

```"k.vigneshwaran K" wrote in message <jv81cj\$ide\$1@newscl01ah.mathworks.com>...
> y=ax+b format,in  this y is of 20by 20 matrix
> plot with respect to time
> but the command window shows like below
> pls help me to solve this
> time span is
> t=linspace(0,0.12,10)
>
> Error using ==> plot
> Vectors must be the same lengths.

size(t)
ans =
1   167

You can plot multiple columns of y with t, but t and y need to be the same length.

Barry
```
 0

1 Replies
24 Views

Similar Articles

12/13/2013 8:26:23 PM
[PageSpeed]

Similar Artilces:

Re: Plot of (2 x^2
Thank you very much, I conclude that Piskounov use another convention for the root z^(1/3). He gives, for the graph of (2 x^2 - x^3)^(1/3) what I obtain with : Plot[Piecewise[{{(2 x^2 - x^3)^(1/3), x <= 2}, {-Re[(2 x^2 - x^3)^(1/3)], x > 2}}], {x, -1, 3}] See : Calcul Differentiel et integral, N. Piskounov, Editions MIR, Moscou 1970, on p. 210 Best Regards= ...

Re: Overlaying List...Plots with other Plots? #3
On 9/22/09 at 7:09 AM, max@alcyone.com (Erik Max Francis) wrote: >Bill Rowe wrote: >>I don't know that there is a standard way. And as for proper way, I >>would say anything that yields the desired result can be considered >>proper. In any case, here is one way >>data = RandomReal[1, {10, 2}]; f = FindFit[data, m x + b , {m, b}, >>x]; >>Plot[m x + b /. f, {x, 0, 1}, Frame -> True, Axes -> None, Epilog >>-> {Point[data]}, PlotRange -> {.95 Min@data[[All, 2]], 1.05 >>Max@data[[All, 2]]}] >Thanks to everyone w...

plotting a 3-d sphere using existing 3 vectors.
hey , i have using xlsread got a file having 3 columns. Now i want to plot these 3 axes on a sphere within a certain radius of 5angstrom units. How can I do this. since the surf function only allows me to plot the X , Y axes and the z axis is a scalar .. which is the length of x, y .. please would appreciate any help on this.. ...

map plotting #3
Hello, I have a code that plots the coordinates in a global map. I just wanna use the same procedure but i need differentiate the coordinates with different colors and I tried using color tables but its not changing color of any of the points that is on the map. Can anyone help me fix this? I'm appending the code that I have to plot these points on the map.. All I want is to change the color of the points that I have on the map. The above code just plots the asterisks on the map... I just wanna change the color of those asterisks. Thanks, Mahesh -------------------------------------------...

Polar plot #3
Hi I am trying to plot a simple polar graph with the following data points. X Y 30 degrees 4.5 42.5 degress 5.31 77 degrees 7.87 How would I plot the above graph? How would I create an m-file which will hold these values under different cariable names so that I can call it as a polar(theta,rho) function. WHhat I've tried is not working t=[30,42.5,77) r=[4.5,5.31,7.87) polar('t','r') this seems to return an error- can some one tell me what's worn in this? Thanks On 2006-05-30 22:40 newuser said the following: > Hi > > I am trying to plot a simple...

GUI Plot #3
Hi, i'm unable to have my simulink plot data to my GUI plot. The GUI will only display data up to 40s; after this an error appears saying the vectors are not the same size. my code in my gui looks like this: axes(handles.plot_tundish_weight) plot(tout, tundish_weight) xlabel('Time') ylabel('Weight (tons)') Title('Tundish Weight') grid on Is there anyway to plot my data past 40s? Thanks everyone "Joseph Stuber" <stuber_joseph@yahoo.com> schrieb im Newsbeitrag news:g79r16\$c9g\$1@fred.mathworks.com... > Hi, i'm unable to have my simulin...

problem with plot #3
Hi, I'm writing to you because I have a problem with that code, it gives me the good values but the plot does'nt work (it plots nothing). Can somebody help me please? Thanks a lot. c=3*10^8; f=2*10^6; R=20000; Imax=10; theta=90*(pi/180); lambda=c/f; beta=2*pi/lambda; %H=lambda*length; for length=0:0.1:1 H=lambda*length; E=abs((60*Imax/R)*((cos(beta*H*cos(theta))-cos(beta*H))/sin(theta))) %plot(length,E); end plot(length,E); On 11 Mar, 19:53, Hussard11 <t...@club-internet.fr> wrote: > Hi, I'm writing to you because I have a problem with that code, it > gi...

matlab plot #3
How do I plot with Matlab using a logarithmic scale for both X- and Y-axis? "ml Liu" <meiliu80@gmail.com> wrote in message news:gfce3n\$7bl\$1@fred.mathworks.com... > How do I plot with Matlab using a logarithmic scale for both X- and > Y-axis? Two ways: x = 1:10; y = x.^2; figure; loglog(x, y); figure; plot(x, y); set(gca, 'XScale', 'log', 'YScale', 'log'); -- Steve Lord slord@mathworks.com ...

plotting #3 406065
i'm not a matlab programmer, i have just taken a course in matalb programming to be able to employ this program in the applications of the Economics. my problem is to plot a network fiigure between several nodes and to visually represent the interconnected data between no. of sectors. and to put the value of the transaction over the line that shows there is a link between these sectors. i tried to write its program, but i could not reach. please, is there anyone who could give me a hint about this plot. i'll be very thankful........... thanks so much. "asmaa adel" <...

3-D plot
I have sets of X, Y & T where X is distance, Y is moisture concentration & T is time and where Y is dependent on X,T. Now I wan to plot these all points on a 3-D surface. How can I do it ? What command should I use ? ...

Plot for sale #3
SELL OUT land area with 12,681 ha, located at the entrance to the town of Pazardzhik(Bulgaria) in city limits and has 106 meters individual . "Dimcho Debelyanov (Miryansko road). A plot in the new economic zone of the city - in the vicinity has built industrial enterprises, shops and warehouses. Until the plot has built any communications - trafopost, water supply, sewerage, telephone lines, street lights, bus stop . MORE INFORMATION ON TEL: +359898408331 OR COPY THIS LINKS: http://www.youtube.com/watch?v=k14WAzpANJc and http://groups.google.com/group/propertybg ...

Plotting a circle #3
Hi, I have a mesh grid values of X & Y which is a nXn matrix. The thing is that I want to plot a sector of a circle with its corresponding amplitudes on that rectangle. How can it be done. With Regards, Mallu ...

Plotting vectors #3
Hi, I am trying to find the eigenvectors of a 2D matrix and then want to plot them w.r.t the actual coordiante space.Its like overlaying the eigenvectors on top of the scatter plot of the points. I have gone through various tutorials online which show such an image while introducing eigen analysis.Could any one please tell how to actually plot it. Thanks. ...

3-D plot #2
Hello guys, I am working on a 3-D plot of a set of ~160.000 points. By now I am using plot3 but once the data is plotted, it becomes pretty slow to rotate the graph. I know this is because every time the graph is rotated, each data point is being plotted again. However, I have seen exactly the same kind of 3-D plot in a Matlab GUI I am using to perform other things, and I can rotate the graph pretty fast there! But I can't see which code was used because the author have compiled it into a stand-alone version. Well, anyone has any tip to speed up rotating in cases like this one? So ...

having trouble with simple plot #3
here is what i have my X variable defined as: p4xe = 0:1/100:2*pi; here is what i have my Y variable defined as: p4ye = (exp(.25.*p4xe).*cos(p4xe)+.25.*exp(.25.*p4xe).*sin(p4xe)-1.)/exp(.25.*p4xe); which should look like: y=(e^(x/4)cos(x) + 1/4e^(x/4)sin(x) - 1) --------------------------------------- e^(x/4) when I plot that, I get a straight line. Can someone figure this out for me? ...

3-D Plot Help
Hello, I have 3 vectors, with x y and z coordinates that I would like to plot. I would like to show these points plotted over a period of time though in a video. (plot point 1, wait a second, plot point 2 etc). This is to show the motion of a particle over time. Any thoughts on how to do this? "Chris " <c_v31@hotmail.com> wrote in message <ichbn1\$fl\$1@fred.mathworks.com>... > Hello, > > I have 3 vectors, with x y and z coordinates that I would like to plot. I would like to show these points plotted over a period of time though in a video. (plot point ...

3D polar plots #3
I want to make a 3D polar plot using the "polar3D" function which I downloaded from this site. Whatever arguements I enter for this function, I always get the following error: ??? In an assignment A(matrix,:) = B, the number of elements of the subscript in A and number of rows in B must be the same. Error in ==> C:\MATLAB6p1\work\D3dumping\polar3d.m On line 254 ==> theta(j,:) = ones([L 1])*angl(j); Error in ==> C:\MATLAB6p1\work\D3dumping\prac8.m On line 9 ==> [Xout, Yout, Zout] = polar3d(zin,0.1,1.25,1,60,1) Any suggestions from a user of this function would be grate...

Problem with 3-D plot
Hi, I have the following code for the bifurcation diagram in 3D and I always get the error message ??? Error using ==> plot3 Data may not have more than 2 dimensions <<<<<<<<<<<<<<<<<<< startR = 0; % first value of R to plot endR = 4; % last value of R to plot R = linspace(startR, endR, numR); % SET UP VARIABLES (leave thesealone) numa = 100; % how many values of a to include on plot starta = 0; % first value of a to plot enda = 4; % last value of a to plot a = linspace(starta, enda, numa); % SET UP VARIABLES (leave thesealone) skip...

Re: NDSolve and Plot #3
Clear[x, y, =CE=93, =CE=B8] H = {{215, -104.1, 5.1, -4.3, 4.7, -15.1, -7.8}, {-104.1, 220, 32.6, 7.1, 5.4, 8.3, 0.8}, {5.1, 32.6, 0, -46.8, 1, -8.1, 5.1}, {-4.3, 7.1, -46.8, 125, -70.7, -14.7, -61.5}, {4.7, 5.4, 1, -70.7, 450, 89.7, -2.5}, {-15.1, 8.3, -8.1, -14.7, 89.7, 330, 32.7}, {-7.8, 0.8, 5.1, -61.5, -2.5, 32.7, 280}}; n = Length[H]; density = Table[rho[i, j][t], {i, n}, {j, n}]; rhoVec = Flatten[density]; rhoVecBare = Flatten[Table[rho[i, j], {i, n}, {j, n}]]; unitaryTerm = -I*(H.density - density.H); trappingTer...

3-D polar plot
I want to plot a surf plot of a matrix of data I have in polar coordinates. So for instance: theta=[0 .1 .2 .3]; r=[1 2 3 4]; data=[1 2 3 4;5 6 7 8;9 10 11 12; 13 14 15 16]; Obviously I could plot it using surf(theta,r,data) but the coordinate system is wrong. I want something like polar3d. I tried polar3d at the download site, but that assumes the spacing between theta and r variables is identical, but in my case it is .1 for theta and 1 for r. Any ideas? Bumping... I want to plot a surf plot of a matrix of data I have in polar coordinates. So for instance: theta=[0 .1 ....