i tried to form an matrice and took this error. here is my code.
function [matrix1,matrix2] = fnc(delta_z,w); delta_z=450e-9; N_a=2.5; f=3e14:1e12:5e14; w=2*pi*f; k=N_a*(w/3e8); q_j=-k/(2*pi*f*4*pi*10e-7); matrix1(1,1)=cos(k*delta_z);matrix1(1,2)=(i/q)*sin(k*delta_z); matrix2(1,1)=(i*q)*sin(k*delta_z);;matrix2(1,2)=cos(k*delta_z); end
my aim is to form a matrix like the one in an image and for different layers and multiply them with another matrices. do you suggest any thing? best regards..
Best Answer