Info
This question is closed. Reopen it to edit or answer.
Cell contents assignment to a non-cell array object - symbolic calculation
2 views (last 30 days)
Show older comments
Hi guys!
I am trying to symbolically calculate multiplication of matricies with elements with besselh. besselh can not get a symbolic input so I wrote the elements as:
f_min=@(k,w) sqrt(epsilon(i+1)*(w./c).^2-k.^2); %suppose to stand for kn+1
f_pls=@(k,w) sqrt(epsilon(i)*(w./c).^2-k.^2); %suppose to stand for kn
chi_min=@(k,w) f_min(k,w).*(R(i+1)-0.5*delta(i+1));
chi_plus=@(k,w) f_pls(k,w).*(R(i)+0.5*delta(i));
A=@(k,w) (f_min(k,w)./epsilon(i+1))*(besselh(0,2,chi_min(k,w)).*besselh(1,1,chi_min(k,w))-besselh(0,1,chi_min(k,w))*besselh(1,2,chi_min(k,w))).^-1;
A11=@(k,w) (epsilon(i+1)./f_min(k,w)).*besselh(1,1,chi_min(k,w)).*besselh(0,2,chi_plus(k,w))-(epsilon(i)./f_pls(k,w)).*besselh(0,1,chi_min(k,w)).*besselh(1,2,chi_plus(k,w));
A12=@(k,w) (epsilon(i+1)./f_min(k,w)).*besselh(1,1,chi_min(k,w)).*besselh(0,1,chi_plus(k,w))-(epsilon(i)./f_pls(k,w)).*besselh(0,1,chi_min(k,w)).*besselh(1,1,chi_plus(k,w));
A21=@(k,w) (epsilon(i)./f_pls(k,w)).*besselh(0,2,chi_min(k,w)).*besselh(1,2,chi_plus(k,w))-(epsilon(i+1)./f_min(k,w)).*besselh(1,2,chi_min(k,w)).*besselh(0,2,chi_plus(k,w));
A22=@(k,w) (epsilon(i)./f_pls(k,w)).*besselh(0,2,chi_min(k,w)).*besselh(1,1,chi_plus(k,w))-(epsilon(i+1)./f_min(k,w)).*besselh(1,2,chi_min(k,w)).*besselh(0,1,chi_plus(k,w));
T{i}=@(k,w) A(k,w).*([A11(k,w),A12(k,w);A21(k,w),A22(k,w)]);
Where T(i) stands for the i matrix I need to multiply. In the last line I try to save the matrix T which is a function of (k,w) but I got (because of the last line):
"Cell contents assignment to a non-cell array object."
What should I do?
Thank you in advance,
Omer
0 Comments
Answers (1)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!