plotting .mat file......
Show older comments
Hi, I want to plot from spectrum.mat file but it giving me following error. Error using plot Invalid first data argument. Error in data (line 5) plot('spectrum.mat')
But when I exactly load this file then it loading and at right in 'workspace box' giving "spec 401x2 double" values.
Could anyone please let me know that why I can't plot this "spectrum.mat" file, kindly if someone show me the procedure for plotting .mat files. By the way in this spectrum.mat file there are two columns (e.g x-axis Frequency and y-axis Scale) and 401 rows.
Thanks
Accepted Answer
More Answers (1)
Moiz Tariq
on 5 Dec 2018
Edited: Moiz Tariq
on 5 Dec 2018
2 votes
See tthe name of file in workspace
let's say the name is wwe
write in comand window
[load'wwe.mat'
x=wwe(:, 1)
y=wwe(:,2)
plot(x,y)]
Categories
Find more on Encryption / Cryptography in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!