Plotting a bode graph extracted from LTSPICE simulator
Ältere Kommentare anzeigen
hi,
i'm trying to plot a bode graph but at the moment of show in it on matlab the graph doesn't show up, but just the axes thought. What happen is that the 'D' variable is just saving the first row, but not the rest. I have been looking on the documentation of 'textscan' and it says that if the parameter 'formatSpec' doesn't match with the text field, it will throw a error and save the the prebius rows, yet my every rows in the .text is the same.
Here is my code (text field attached) if maybe it's someting wrong with it. I will really apreciate the help.
archivo = fopen('DatosBodeFinal.txt');
Dc = textscan(archivo, '%f (%fdB,%f°)','CollectOutput',1);
fclose(archivo);
D = cell2mat(Dc);
disp(Dc);
figure
subplot(2,1,1);
semilogx(D(:,1), D(:,2),'Color','k','LineWidth',3);
ylabel('Amplitude (dB)');
grid
subplot(2,1,2);
semilogx(D(:,1), D(:,3),'Color','k','LineWidth',3);
ylabel('Phase (°)');
grid
xlabel('Frequency');
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
