Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Plot signal from list of data in MATLAB

  1. Feb 25, 2010 #1
    I want to load a .mat file which contain 500 column of data in it and plot the signal out through the GUI using .m file.
    Can anyone help me on the code?
  2. jcsd
  3. Feb 25, 2010 #2
    So you have a set of y-data of 300. Make an x vector of size 300 that goes from 0 to 300 and then plot(x,y);
  4. Mar 8, 2010 #3
    I'm now actually unable to load the .mat file using 'load' command.
    I doing this way in m-file:

    load filename;
    [x,y] = size(filename);
    t = 1:y;
    plot(t, filename);

    %the filename is in .mat format
  5. Mar 14, 2010 #4
    can anyone help me in load a .m file and plot the signal out?

    using this way:
    [Filename, PathName] = uigetfile('*.m','Select the M-file');
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook