Changing order when calculating frequencies in a loop
古いコメントを表示
For a campbell analysis of a rotation system, I'm calculating the critical frequencies with gyroscopic effect in a for loop in the frequency span of 3000 rad/s. At the end of the loop, I'm saving the frequencies in a matrix to plot the campbell diagram afterwards. Here the problem occurs. For an example, if the backward whirl frequency for the second frequency becomes lower than the forward whirl frequency of the first frequency, they switch indicies in the matrix, and therefore, the campbell diagram becomes a mess.
Does any of you have any suggestions on how to fix this problem?

Example of plot. Notice that what should be a smooth curve change color (direction).

6 件のコメント
Mathieu NOE
2021 年 12 月 22 日
hello
maybe you should post the code instead of an image of it
this way we can better help you
Casper Drangsfeldt
2021 年 12 月 22 日
Mathieu NOE
2021 年 12 月 22 日
It may not please you but the poor's man solution is to force all traces to have same color so you don't see that effect
%--------------------------------------------------------------------------
% Plotting
%--------------------------------------------------------------------------
w = 1:w;
figure(2)
% for i = 1:size(CAM,1)
% plot(w,(CAM(i,:)),'LineWidth',2)
% hold on
% pause
% end
plot(w,CAM,'b','LineWidth',2)
hold on
plot(w,w,'r--','LineWidth',2)
Casper Drangsfeldt
2021 年 12 月 22 日
Mathieu NOE
2021 年 12 月 22 日
Casper Drangsfeldt
2021 年 12 月 23 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!