Saving data from for loops
显示 更早的评论
Hello!
I am trying to plot all the Y-values from the for loop but it seems that I recieve a new Y-value from every itterations. I think that when plotting, I only plot ONE Y-value. not all of them. I believe saving all the Y-values into a array would make it possible to plot X,Y. How can I save the Y-values? Or is there any other way to plot my data?
clear all
close all
clc
Mmax=10.76; %Maximum mass
Mmin=10.32; %Minimum mass
Mdiff=0.44; %Mass difference
UptakeW=(Mdiff/Mmin); %In percentage
A=load('MMC#8-PURE_TGA-Heated_Samples_05102020.txt');
B=A(2735:4823,5);
X=0:0.1:50;
for i=0:0.01:Mdiff
Y=((i)./Mdiff)*100
end
plot(X,Y)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Agriculture 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!