Hello everybody,
Here is my question: if the first logical expression is correct, depth_tot_7 will be calculated. If not, the (if correct) next logical check calculates depth_tot_5 or depth_tot_3. What I additionally want to achieve are the following two things:
a) I want to define a range from 3, 5, 7 for lam without having to specify one of these values at the beginning. It´s either 3, 5 or 7. Depending on this value, the if function shall be performed. If I define the range for lam, for some reason depth_tot_3 is calculated, while if a single value for lam is defined, the if function is performed correctly.
b) If i.ie. lam=3, I would like the program to combine all of the possible lamella depths that are contained in the regarding formula. This means that I´d like my programm to create total depths where lamellas have different attributed depths (for lam = 3 i.e. 25*2+50, 35*2+20, 50*2+35, 45*2+50 etc.). I would like to achieve that the values are differently combined to each other, considering the fact that these single lamellas have the same range and steps.
I hope that my explanation is now clear and looking forward to your answers and help.
Best regards
span=3.5:0.5:7;
lam=3:2:7;
lam_o_p=20:5:50;
lam_i_p=20:5:50;
lam_i_c=20:5:50;
if(lam>5)
depth_tot_7=(lam_o_p)*4+(lam_i_p*2)+(lam_i_c);
elseif (lam>3)
depth_tot_5=lam_o_p*2+lam_i_p*1+lam_i_c;
else
depth_tot_3=lam_o_p*2+lam_i_c;
end