Plot signal from list of data in MATLAB

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 7K views
kay310
Messages
8
Reaction score
0
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?
 
Physics news on Phys.org
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);
 
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
 
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');