How to plot angle (in radians) versus phase shift?
이전 댓글 표시
Hi,
I want a profile with phase angle plotted against angle in radians.
Presently I have a code with phase angle plotted against a linear distance which is as below.
Need your valuable advice how to do the necessary changes in this code.
Also I need to determine its slope.
Sincerely,
rc
clc;
clear;
phi_1 = [0.1724*pi 0.1472*pi 2.18*pi 2.25*pi 4*pi 3.588*pi 1.012*pi 4.112*pi 4.31*pi 4.25*pi 0.832*pi];
x1 = linspace(0,1,11);
coefficients1=polyfit(x1,phi_1,1);
slope1=coefficients1(1);
intercept1=coefficients1(2);
figure(1)
hold on
plot(x1,phi_1,'o')
plot([0 1],intercept1 + slope1*[0 1])
댓글 수: 1
David Goodmanson
2023년 6월 20일
Hi Rahul,
you can shorten up the code by eliminating the slope and intercept calculations and plotting the line with
plot([0 1],polyval(coefficients1,[0 1])).
It's not possible to say anything about plotting using angle without knowing the lower and upper limits of the angle. Anyway, any kind of straight line fit to this data looks pretty dubious.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Time Series Events에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
