Varying two dependent variables
Mostra commenti meno recenti
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 Commento
Andrew Newell
il 25 Gen 2012
If you are asking the question you seem to be asking, just divide a by 2.
Risposte (3)
Sean de Wolski
il 25 Gen 2012
or use min() and max() to operate the saturation.
b = min(max(-10:10,-5),5)
irina Tatu
il 26 Gen 2012
0 voti
Walter Roberson
il 26 Gen 2012
0 voti
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?
Categorie
Scopri di più su Graphics Performance in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!