How introduce column vector in M-file?
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 19 Feb. 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
am 19 Feb. 2023
Abu Zar
am 19 Feb. 2023
Image Analyst
am 19 Feb. 2023
whos temp1
What does that show? Does it show many rows and 1 column?
Abu Zar
am 19 Feb. 2023
Walter Roberson
am 19 Feb. 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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Quantum Mechanics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



