Wrapping of cubic equation

1 次查看(过去 30 天)
tan
tan 2017-1-20
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]);

回答(1 个)

Bjorn Gustavsson
Bjorn Gustavsson 2017-1-20
Perhaps what you want is something like this:
f_wrapped = rem(f,2*pi);
HTH

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by