Plotting LTSpice bodeplot in Matlab
显示 更早的评论
I've tried to implement the accepted solution, but it does not work. The variable Dc is empty, and the resulting plot is an empty plot with the axes shown. I've tried to read the documentation for fopen and textscan, but cannot find an answer to what I might be doing wrong.
I use the R2020a version, so I should be up to date.
filename = 'RVDT_feedback_filter_V1.txt';
fidi = fopen(filename, 'rt');
Dc = textscan(fidi, '%f(%fdB,%f°)', 'CollectOutput',1);
D = cell2mat(Dc);
figure
subplot(2,1,1)
semilogx(D(:,1), D(:,2))
title('Amplitude (dB)')
grid
subplot(2,1,2)
semilogx(D(:,1), D(:,3))
title('Phase (°)')
grid
xlabel('Frequency')
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
