How introduce column vector in M-file?
Afficher commentaires plus anciens
how I improved my file to get { temp1<<1}, I am stuck here.
i gto sugestion to introduce column vector for temp0 but i am fail in this stage
7 commentaires
Walter Roberson
le 19 Fév 2023
ket = sum(tmpI(:,2:D),2);
The sum over the second dimension of a 2d array is going to be a column vector.
temp0 = symsum(exp(-abs(alpha(k))^2 * alpha(k)^n / sqrt(factorial(n)) ), n, 0, 14)*ket;
symsum of a scalar expression is going to give a scalar result. You then multiply by the column vector, and that will give you a column vector result.
It therefore appears that your temp0 is already a column vector.
Abu Zar
le 19 Fév 2023
Abu Zar
le 19 Fév 2023
Image Analyst
le 19 Fév 2023
whos temp1
What does that show? Does it show many rows and 1 column?
Abu Zar
le 19 Fév 2023
Walter Roberson
le 19 Fév 2023
double() or vpa()
The exp() terms I tested were exp(-1e-9) to exp(-1e-15). Precision is low in that range but the values should be distinguishable from 1.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Quantum Mechanics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



