Wrapping of cubic equation
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all,
I am currently trying to wrap a cubic equation between 0 and 2pi as shown on the diagram on the right. The code to generate the cubic plot is as shown below. Appreciate if you guys can provide a solution for this.
Matlab coding for cubic Plot:
clc;
close all;
clear all;
N = 10;
a=-N:0.1:N
CubicPlot=0.0628.*a.^3;
plot(a,CubicPlot)
xlabel('SLM Position[mm]');
ylabel('Phase[rads]');
hold;
plot(10,62.93,'r.','MarkerSize',30)
plot(0,0,'r.','MarkerSize',30)
plot(-10,-62.93,'r.','MarkerSize',30);
axis([-10,10,-100,100]);
댓글 수: 0
답변 (1개)
Bjorn Gustavsson
2017년 1월 20일
Perhaps what you want is something like this:
f_wrapped = rem(f,2*pi);
HTH
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!