please help me in plotting this c++ data (which is in txt file) in matlab.i have attached that file
6 次查看(过去 30 天)
显示 更早的评论
this data is to be plotted
回答(1 个)
C B
2023-4-21
编辑:C B
2023-4-21
% Read the data from the file
data = dlmread('Mass_tcm.txt');
% Extract the parameter and target variable values from the data
space = data(:,1);
time = data(:,2);
% Plot the data
plot(time, space, 'o-')
xlabel('space')
ylabel('time')
title('space vs time')
% Plot the data
plot(space, time, 'o-')
xlabel('time')
ylabel('space')
title('time vs space')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Instrument Control Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!