prabhu g wrote:
first case Tk=15mm
than n should vary from 2 to 16, for each value of n pressure_critical will be different
so, pressure_critical will have 15 values for one Tk, output should be least of the pressure_critical
than Tk will be 16mm, program repeats
i want output in the form of "Timo_Pcr(TK)", output will have 60 values
So write your function to work for 1 scalar input value and return 1 scalar and then call it with a vector as argument and use vectorization - thats what vectorization is for.
See attached