Added: 2 years ago
From: MATLAB
Views: 37,588
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
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.

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

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

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

  • Why is video not suuported on iPhone???

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

  • K, i understand if you can't do it.

    its okay :]

  • Thanks! :)

  • 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(num2st­r(exp(x)')));

  • How can I plot points with given coordinates on a given function?

    Also, is there a way to label them?

  • Thanks Great video

  • Can you tell us exactly how you encoded this video?

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

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