periodic symbolic matlab function

6 Ansichten (letzte 30 Tage)
Youssef
Youssef am 21 Mai 2014
Kommentiert: Walter Roberson am 22 Mai 2014
say I want to make a symbolic function (I mean a function of a symbolic variable x), but it's periodic. Imagine a rectangle that repeats itself along the x axis. But I want it symbolic, not in function of an array x. How to implement it? I can use a for loop but the loop is limited! And there is no such thing as "for i=1:inf"

Antworten (2)

Walter Roberson
Walter Roberson am 22 Mai 2014
xm = mod(x,AppropriatePeriod);
and then use xm instead of x in your formula

Youssef
Youssef am 22 Mai 2014
can you please write down a couple of lines code using mod and ezplot?
  1 Kommentar
Walter Roberson
Walter Roberson am 22 Mai 2014
Take the implicit example
ezplot('x^2-y^4')
and modify to
ezplot('mod(x,8)^2-y^4')
to get it to repeat every 8

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by