Borrar filtros
Borrar filtros

Info

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

Simple Question: Taking Some Elements of Variables Based on Number

1 visualización (últimos 30 días)
Berk Demir
Berk Demir el 24 de Abr. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Bx is an array. Size is 6x1.
When I want two rows of members from that, it gives me as it should. If I ask only one row, it gives as second one. Isn't that wrong? Am I doing something wrong? Since I have based my code to the first type, due to second type of output I got errors
K>> B_x([1 2;3 4])
ans =
-25 -24
-23 -22
K>> B_x([1 2])
ans =
-25
-24
  2 comentarios
Tommy
Tommy el 24 de Abr. de 2020
When you call B_x([1 2]), even though the indices are a row vector, you get a column vector because B_x is a column vector.
Berk Demir
Berk Demir el 24 de Abr. de 2020
Editada: Berk Demir el 24 de Abr. de 2020
That's OK. But why I get 25 and 24 as row vector in the first instance? In my mind it is just one less row in the second instance. The same type answer should be given to me.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by