How to use i_temp function and load all data of simualtion?
1 次查看(过去 30 天)
显示 更早的评论
i_temp=0;
for ftemp=[5:5:130,200:50:1000];
i_temp=i_temp+1;
load(['ZCodeDfig_',num2str(ftemp),'.mat']);
ZCodeDfig
f_fft(:,i_temp)=Vmagfinalfft;
v_fft(:,i_temp)=Vfinal;
if_fft(:,i_temp)=Imagfinalfft;
i_fft(:,i_temp)=Ifinal;
Z_fft(:,i_temp)=zftemp;
end
figure
y(ftemp)=dftemp;
r(ftemp)=zftemp;
stem(y,r);
hold off
4 个评论
Walter Roberson
2018-9-27
Could you confirm that each .mat file contains at least two variables, one of which is a struct named Vabc575 and the other of which is a struct named Iabc575 and that the names of those variables do not change as the .mat file name changes?
采纳的回答
Walter Roberson
2018-9-27
Small improvement to the code, but nothing that would change the functioning.
i_temp=0;
for ftemp=[5:5:130,200:50:1000];
i_temp=i_temp+1;
datastruct = load( sprintf('ZCodeDfig_%d.mat', ftemp) );
Vabc575 = datastruct.Vabc575;
Iabc575 = datastruct.Iabc575;
ZCodeDfig
f_fft(:,i_temp)=Vmagfinalfft;
v_fft(:,i_temp)=Vfinal;
if_fft(:,i_temp)=Imagfinalfft;
i_fft(:,i_temp)=Ifinal;
Z_fft(:,i_temp)=zftemp;
end
18 个评论
Walter Roberson
2018-9-29
You have
ftemp=[5:5:130,200:50:1000]
The first range, 5:5:130, stops before 575.
The second range, 200:50:1000, increments by 50s, and so includes 500, 550, and 600, but not 575.
The data you posted on Google Drive does not contain a file for 575.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!