let's me explaining my question :
for example in 1-D
using for loop:
z=[ ]; for Eg=.5:.05:1.3; a = quad(@(x) (x.^2)./(exp(x/0.516)-1) , Eg , 100 ); z = [z a]end
then i use "arrayfun" saving result in 1-D matrix
z=[ ];Eg=0.5:0.05:1.3; a = arrayfun(@(x1)quad(@(x)x.^2./(exp(x/0.516)-1),x1,100),Eg)
Now i want to this process with 2 variables change to 2-d matrix that Eg is on row and Ei is on column.
(here is my code)
z=[ ]; for Eg=.5:.05:1.3; for Ei=0:0.05:Eg-0.05aa= quad( @(E)(E.^2) ./ (exp(E./0.5172)-1), Ei , Eg);z = [z a] endend
thanks 🙂
Best Answer