Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

unexpected behavior with symbolic substitution, 0 in vector

1 visualización (últimos 30 días)
Tonkma
Tonkma el 20 de Ag. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi,
a simple example should show my problem. if i enter in Matlab R2012a:
syms l1y a
ka = [0;a];
subs(ka,l1y,0)
i would expect to get the unaltered vector
[0;a]
instead i get
[l1y;a]
is this a bug or i do i oversee something?
Thx for help.

Respuestas (2)

Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh el 20 de Ag. de 2014
Hi Tonkma,
I think you got what you wrote :)
You defined ka as a column not row (vector), since you used ";" instead of ",". So change ka to
ka = [0,a]
Hopefully this will solve your prob.

Tonkma
Tonkma el 20 de Ag. de 2014
Hi Salaheddin,
thanks for fast response.
just now i had the possibility to test it on R2013b, there it works fine with column vectors.
so it looks like a bug in old version.

La pregunta está cerrada.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by