csv & plot graph (HELP)

6 ビュー (過去 30 日間)
zhixuan hong
zhixuan hong 2018 年 3 月 8 日
回答済み: KSSV 2018 年 3 月 8 日
HI guys , need help here... Figure 1 is my csv data....Why only one set of data (the first set) was plotted in figure 2?
My codes:
fid = fopen('V.csv');
readData=textscan (fid,'%f %f','Headerlines',1,'Delimiter',',');
Xdata=readData{1,1}(:,1);
Ydata=readData{1,2}(:,1);
f1=figure(1);
cla;
hold on;
grid on;
%P = InterX([Xdata;Ydata],[X1data;Y1data]); 
% plot(Xdata,Ydata,X1data,Y1data,P(1,:),P(2,:),'ro')
plot(Xdata,Ydata,'k-','marker','o')

採用された回答

KSSV
KSSV 2018 年 3 月 8 日
T = readtable('V.csv') ;
c1 = T{:,1} ; % first column
c2 = T{:,2} ; % second column
c3 = T{:,3} ; % third column
plot(c1,c2)

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by