# what's the meaning of a number divide column vertor?

1 visualización (últimos 30 días)
Xiao Lee el 19 de Oct. de 2019
Comentada: Stephen23 el 21 de Oct. de 2019
How did matlab get the ans of [0,0,0.3333] ?
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Stephen23 el 19 de Oct. de 2019
Editada: Stephen23 el 19 de Oct. de 2019
"what's the meaning of a number divide column vertor?"
The mrdivide documentation explains at the top of the page that it will "Solve systems of linear equations xA = B for x". In your example you defined a system of lineaer equations with A = [1;2;3] and B=1, so the output you get is one solution of that system. This is easy to check:
>> A = [1;2;3];
>> B = 1;
>> x = B / A
x =
0.00000 0.00000 0.33333
>> x * A % should be == B
ans = 1
If you expect to simply divide 1 by the values of A then you need to use rdivide:
>> 1 ./ A
ans =
1.00000
0.50000
0.33333
To use MATLAB you need to learn the differences between array and matrix operations:
##### 2 comentariosMostrar NingunoOcultar Ninguno
Xiao Lee el 19 de Oct. de 2019
got it...Thx
Stephen23 el 21 de Oct. de 2019
Xiao Lee: I hope that it helped! Please don't forget to accept my answer!

Iniciar sesión para comentar.

### Más respuestas (1)

jeewan atwal el 19 de Oct. de 2019
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre Logical en Help Center y File Exchange.

### Community Treasure Hunt

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

Start Hunting!

Translated by