How introduce column vector in M-file?
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 19 de Feb. de 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
el 19 de Feb. de 2023
Abu Zar
el 19 de Feb. de 2023
Image Analyst
el 19 de Feb. de 2023
whos temp1
What does that show? Does it show many rows and 1 column?
Abu Zar
el 19 de Feb. de 2023
Walter Roberson
el 19 de Feb. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Quantum Mechanics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



