plot data from .mat file
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I have some 649x1 double data saved in "Fidelity_result.mat" file from a matlab code. I want to plot these data as y axis and x axis should be entries from 1 to length of the entries in "Fidelity_result.mat" file. The matlab code shows no error but the figure displayed at the end is blank.
folder = 'C:\Users\Laborbenutzer\Desktop\Tomography Test Akriti';
y=load("Fidelity_result.mat");
y_fidelity=y.Fidelity_result;
x_fidelity=(1:1:size(y_fidelity,1)).';
plot(x_fidelity,y_fidelity)
2 件のコメント
Dyuman Joshi
2024 年 2 月 16 日
The plot is not blank here, see below.
"The matlab code shows no error but the figure displayed at the end is blank."
Could you share the screenshot of the code ran along with the screenshot of the figure generated?
y=load("Fidelity_result.mat");
y_fidelity=y.Fidelity_result;
x_fidelity=(1:1:size(y_fidelity,1)).';
plot(x_fidelity,y_fidelity)
Also, if you want to plot against indices, you can plot it directly -
figure
plot(y_fidelity)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!