Plotting LTSpice bodeplot in Matlab
Mostrar comentarios más antiguos
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')
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Axis Labels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
