error in writing matrix

3 Ansichten (letzte 30 Tage)
sachin k
sachin k am 30 Aug. 2017
Kommentiert: KL am 30 Aug. 2017
I Want to write the matrix from function el(j,k). when I run this, it gives so many errors, please help
lagu=@(j,k,l) feval(symengine,'laguerreL',j,k,l);
ele1=@(j,k) exp(0.25)*sqrt(2.^k/factorial(k))*sqrt(factorial (j)/2.^j)*lagu(j,k-j,-0.5)*(0.5).^(k-j);
ele2=@(j,k) exp(0.25)*sqrt(2.^k/factorial(k))*sqrt(factorial (j)/2.^j)*lagu(j,k-j,-0.5)*(-0.5).^(k-j);
el=@(j,k) 0.5*i*(ele1(j,k)-ele2(j,k));
res=bsxfun(el,1:2,(1:2).')
  2 Kommentare
José-Luis
José-Luis am 30 Aug. 2017
Seriously? You already asked this question today, and accepted an answer that didn't solve your problem by the way.
You also ignored requests for clarification.
I'll repeat: the function el needs to produce a scalar. Does it do that?
KL
KL am 30 Aug. 2017
Yes, you should rather delete one of the questions and edit the other with more information such as
  • the complete error message,
  • your expected output for an example input
and tag the relevant products so it becomes a meaningful post. I'm deleting my answer on your other post, your question was nowhere close to this problem and my answer was purely based on my understanding of your explanation and speculation of your needs.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by