Plotting a bode graph extracted from LTSPICE simulator
古いコメントを表示
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');
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
