What is the shortest way to write this in matlab ?

Posted by ldigas on Stack Overflow See other posts from Stack Overflow or by ldigas
Published on 2010-04-02T14:41:16Z Indexed on 2010/04/02 15:23 UTC
Read the original article Hit count: 254

Filed under:
lam1 = 0.0:0.1:4.0  
lam = 1.60*lam1-0.30*lam1^2 for 0<lam1<=1
lam = lam1+0.30 for 1<=lam1<=4

I have a bunch of those. What would be the 'matlab way' of writing that kinda stuff, short of simple looping by indexes and testing the values of lam1 ?

© Stack Overflow or respective owner

Related posts about matlab