Whta is the shortest way to write this in matlab ?
- by ldigas
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 ?