periodic symbolic matlab function

조회 수: 9 (최근 30일)
Youssef
Youssef 2014년 5월 21일
댓글: Walter Roberson 2014년 5월 22일
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"

답변 (2개)

Walter Roberson
Walter Roberson 2014년 5월 22일
xm = mod(x,AppropriatePeriod);
and then use xm instead of x in your formula

Youssef
Youssef 2014년 5월 22일
can you please write down a couple of lines code using mod and ezplot?
  댓글 수: 1
Walter Roberson
Walter Roberson 2014년 5월 22일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by