Plotting data from table
显示 更早的评论
how can i plot every column ( of a 2 columns table )as a function of time in two different axes ?
回答(2 个)
José-Luis
2013-12-20
doc plotyy
6 个评论
Elia
2013-12-20
José-Luis
2013-12-20
What have you tried so far? Where's your time data? What's wrong with:
plotyy(x1,y1,x2,y2)
José-Luis
2013-12-20
I am sorry, what do you mean by a table? How did you make it?
Elia
2013-12-20
José-Luis
2013-12-20
figure(1)
t = uitable;
set(t,'Data',rand(10,3));
data = get(t,'Data');
figure(2)
aH(1) = subplot(1,2,1);
aH(2) = subplot(1,2,2);
plot(aH(1),data(:,1),data(:,2));
plot(aH(2),data(:,1),data(:,3));
Wei
2013-12-20
0 个投票
You need to convert the table data into numbers, and you need the time for the plot. Try this:
data = str2double(get(handles.table,'data');
plot(axes1, t1, data(:,column's name1));
plot(axes2, t2, data(:,column's name2));
类别
在 帮助中心 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!