Varying two dependent variables

Well I have parameter a and it depends on t. I vary t from 0 to 10 with the command 0:10. a is a function of t. further i want to limit the domain in which a varies. For example, it a varies between [-10;10] I want to limit it to vary between [-5;5].
Any help please?
Thank you

댓글 수: 1

Andrew Newell
Andrew Newell 2012년 1월 25일
If you are asking the question you seem to be asking, just divide a by 2.

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

답변 (3개)

Sean de Wolski
Sean de Wolski 2012년 1월 25일

0 개 추천

or use min() and max() to operate the saturation.
b = min(max(-10:10,-5),5)
irina Tatu
irina Tatu 2012년 1월 26일

0 개 추천

the domains are just an example. the actual domains are the following: t varies 6*3600:18*3600 (seconds, t being the time) a is an angle that varies with time, its maximum domain is from [-90;90] degrees. I want to limit it to [-60;60] degrees, or [-30;30] degrees or [-15;15] degrees.
Further I compute another parameter that depends on a. I have to build these 3 curves (where the angle varies within these 3 domains) and compare them.
Walter Roberson
Walter Roberson 2012년 1월 26일

0 개 추천

What do you want to have happen when the domains are exceeded? Should the values be linearly mapped from the previous domains to the new domains (so, e.g., -45 would map to -7.5), or should the values be "clamped" so that anything below -15 should be limited to -15 ?
Or are you perhaps hoping for a routine that takes an expression or function in 't', figures out the range of 'a' values it calculates, and writes a new "similar" expression or function that has the desired new range?

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

질문:

2012년 1월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by