data is getting plot on 4 different graphs while I would like to see all the data on one graph!
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I do not know what am I doing wronf here, I am trying to plot the dataset from 4 different experiemnt on one graph, but instead I am getting 4 different graphs. Code is below:
files = { 'F:\3-PIV_Experimental_Data\Outlet_110\Data_LaserSheet_D\Data_Head\Data_Raw\LaserSheet.xlsx'; ...
'F:\3-PIV_Experimental_Data\Outlet_110\Data_LaserSheet_C\Data_Head\Data_Raw\LaserSheet.xlsx'; ...
'F:\3-PIV_Experimental_Data\Outlet_110\Data_LaserSheet_B\Data_Head\Data_Raw\LaserSheet.xlsx'; ...
'F:\3-PIV_Experimental_Data\Outlet_110\Data_LaserSheet_A\Data_Head\Data_Raw\LaserSheet.xlsx'};
for i = 1:numel(files)
a = readtable(files{i});
X = a{:,16};
Y = a{:,15};
figure(i)
plot(X,Y,'*');
hold on
end
0 个评论
采纳的回答
VBBV
2022-1-7
figure(1)
If you use loop index for figure, then it will plot as many figures as number of files
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!