J=(2*(abs(besselj(1,m))))/m, how do i get a 3D plot of J, m is a product of sine theta and a constant = 60.54, theta varies from -12 degrees to 12 degrees. please help. thanks.
Thanks a lot, that really helps, now I want a 3D plot of the function J as t (which is actually theta) is varied from 0 degree to 180 degrees. Thanks again. I read about mesh but they all use two variables while all i have is t (theta).
clc; clear all; k=((2*(22/7)*2250000)/1482); a=0.00635; for t=0.1:0.1:12; m=abs(k*a*(sind(t))); J=(2*(abs(besselj(1,m))))/m; disp(J); plot(t,J); end I am not able to get the plot, its plotting only the last point, even though it does show all the values of J properly, then why is it plotting only the last point, and it doesnt matter if i remove any of the semicolons also it doesnt matter if i move the plot function outside the for loop. Please help. Thanks!
clc; clear all; k=((2*(22/7)*2250000)/1482); a=0.00635; for t=0.1:0.1:12; m=abs(k*a*(sind(t))); J=(2*(abs(besselj(1,m))))/m; disp(J); plot(t,J); end I am not able to get the plot, its plotting only the last point, even though it does show all the values of J properly, then why is it plotting only the last point, and it doesnt matter if i remove any of the semicolons also it doesnt matter if i move the plot function outside the for loop. Please help. Thanks!
MATLAB variables are arrays by default. If you remove your for loop as shown below, the variables become arrays, which can be processed with vector operations. When processing vectors here, one thing you also have to do is use"./" instead of "/"to make sure you get element-wise divison (or multiplication in the case of .*) instead of matrix division. Showing other lines that change (space is limited):
@MATLAB Thanks a lot, that really helps, now I want a 3D plot of the function J as t (which is actually theta) is varied from from 0.1 degree to 12 degrees. Thanks again. I read about mesh but they all use two variables while all i have is t (theta).
It is possible to do a scatter plot with the simple, general purpose "plot" command by specifying/setting "no line" (and just markers), but the "scatter" command provides additional arguments to let you specify the area and color of the markers (its more obvious when you call it as a function rather than when you use it interactively). Googling the command names + matlab will find the documentation.
Hey i was wondering if you could help me out with this: Write a function that plots a whirlpool in the following fashion:
- theta is (2*height*intensity) evenly spaced points between 0 and height/2 - x and y are defined as circles, with the radius being the height and the angles being theta*intensity - z is theta - x, y,and z are plotted on the same graph as -x, -y, and -z. All lines should be black - the figure should be titled 'Whirlpool!' and should show a grid
It was a Camtasia project, captured at 15fps, zoomed to 640x360, then published to a 1280x720, H.264, MOV file, 24fps, (best quality), resulting in 1667kbps data rate. Audio was 44.1kHz, Mono.
how to read .hdf file using matlab? please help.
i have data from NASA but all of the data were in hdf format
i think matlab can read these but i dont know how...
i would really appreciate someone's help... thanks!
azzert10 5 months ago
J=(2*(abs(besselj(1,m))))/m, how do i get a 3D plot of J, m is a product of sine theta and a constant = 60.54, theta varies from -12 degrees to 12 degrees. please help. thanks.
whatever3009 11 months ago
This has been flagged as spam show
Thanks a lot, that really helps, now I want a 3D plot of the function J as t (which is actually theta) is varied from 0 degree to 180 degrees. Thanks again. I read about mesh but they all use two variables while all i have is t (theta).
whatever3009 1 year ago
This has been flagged as spam show
whatever3009 1 year ago
whatever3009 1 year ago
MATLAB variables are arrays by default. If you remove your for loop as shown below, the variables become arrays, which can be processed with vector operations. When processing vectors here, one thing you also have to do is use"./" instead of "/"to make sure you get element-wise divison (or multiplication in the case of .*) instead of matrix division. Showing other lines that change (space is limited):
t=0.1:0.1:12; % Remove "for"
J=(2*(abs(besselj(1,m))))./m; % Add "."
% Remove "end"
MATLAB 1 year ago
@MATLAB Thanks a lot, that really helps, now I want a 3D plot of the function J as t (which is actually theta) is varied from from 0.1 degree to 12 degrees. Thanks again. I read about mesh but they all use two variables while all i have is t (theta).
whatever3009 1 year ago
can you believe it, you've already completed C
MrRudenskii 1 year ago
Hey i have a general doubt regarding Matlab commands:'
what is the difference between a scatter plot command "scatter"
and normal plot command "plot"??
ajayram198 1 year ago
It is possible to do a scatter plot with the simple, general purpose "plot" command by specifying/setting "no line" (and just markers), but the "scatter" command provides additional arguments to let you specify the area and color of the markers (its more obvious when you call it as a function rather than when you use it interactively). Googling the command names + matlab will find the documentation.
MATLAB 1 year ago
Why is video not suuported on iPhone???
xjigarx 2 years ago
Hey i was wondering if you could help me out with this: Write a function that plots a whirlpool in the following fashion:
- theta is (2*height*intensity) evenly spaced points between 0 and height/2 - x and y are defined as circles, with the radius being the height and the angles being theta*intensity - z is theta - x, y,and z are plotted on the same graph as -x, -y, and -z. All lines should be black - the figure should be titled 'Whirlpool!' and should show a grid
brvheavyhitter20 2 years ago
You need to try this yourself. plot3 might be useful.
MATLAB 2 years ago
K, i understand if you can't do it.
its okay :]
brvheavyhitter20 2 years ago
Thanks! :)
shahzad113 2 years ago
Do you mean, you have a function f(x) e.g. exp(x) and you want to evaulate it at a number of points e.g. x=1,2,3,4,5? It would be:
>>x=[1 2 3 4 5];
>>plot(x,exp(x));
Labelling values, e.g. f(x), is more ticky. You have to create a cell array of string lables then use the text command to plot them:
>>text(x,exp(x),cellstr(num2str(exp(x)')));
MATLAB 2 years ago
How can I plot points with given coordinates on a given function?
Also, is there a way to label them?
darijo203 2 years ago
Thanks Great video
bmsabry 2 years ago
Can you tell us exactly how you encoded this video?
craigtests 2 years ago
It was a Camtasia project, captured at 15fps, zoomed to 640x360, then published to a 1280x720, H.264, MOV file, 24fps, (best quality), resulting in 1667kbps data rate. Audio was 44.1kHz, Mono.
MATLAB 2 years ago