How to plot graph from mat file?
28 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I face a difficulty in plotting graph from mat file. I want to get the graph from the mat file but the graph did not pop out and get the result in command window as shown in the figure 1 below.
Figure 1
The figure 2 below is the setting for the code.
Anyone can help me? Thanks. This is the code I am using:
clc;
clear all;
close all;
s = load('lai3.mat');
plot(transpose(s.val))
采纳的回答
Subhamoy Saha
2020-3-25
clc;
clear all;
close all;
s = load('lai3.mat');
x=s.lai3(:,1); % s is having a field named lai3
y=s.lai3(:,2);
plot(x,y)
4 个评论
Subhamoy Saha
2020-3-25
Can you tell what was the problem because I'm getting plot with the sugested line of codes.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!