Wrapping of cubic equation

1 回表示 (過去 30 日間)
tan
tan 2017 年 1 月 20 日
回答済み: Bjorn Gustavsson 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 Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by