Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Interactive Plot Creation with the Plot Tools

Loading...

Sign in or sign up now!
37,565
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 17, 2009

Create and edit plots with the plot tools interactively plotting environment. Download code and watch other videos at http://www.mathworks.com/video

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 3 dislikes

Link to this comment:

Share to:

Uploader Comments (MATLAB)

  • 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):

    t=0.1:0.1:12; % Remove "for"

    J=(2*(abs(besselj(1,m))))./m; % Add "."

    % Remove "end"

  • Hey i have a general doubt regarding Matlab commands:'

    what is the difference between a scatter plot command "scatter"

    and normal plot command "plot"??

  • 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

  • You need to try this yourself. plot3 might be useful.

see all

All Comments (20)

Sign In or Sign Up now to post a comment!
  • 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!

  • 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.

  • @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).

  • can you believe it, you've already completed C

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more