Hello, I am a new matlab user and I am trying to divide two vectors that contain numbers to create a new one. So I am typing the division like this:
Vector=Alpha./Beta
and I get a vector full of zeros.
Do you have any idea why this happens or how I could fix it?
Thank you

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 18 de Jul. de 2015
Editada: Azzi Abdelmalek el 18 de Jul. de 2015
A=[1 2 3]
B=[4 5 6]
out=A./B
Where is the problem with this division?

3 comentarios

saravan1992
saravan1992 el 18 de Jul. de 2015
Editada: Azzi Abdelmalek el 18 de Jul. de 2015
I don't see a problem in this division. It gives:
out=[0.25 0.4 0.5]
The division I am talking about includes two vectors with more than 100000 rows, but this should not be a problem. So to give an example, part of the two vectors are:
A=[4.47 5.47 5.90 7.25]
B=[4.12 2.00 1.12 3.75]
Then I type
out=A./B
and I get
out=[0.00 0.00 0.00 0.00]
A=[4.47 5.47 5.90 7.25] ;
B=[4.12 2.00 1.12 3.75];
format long;
A./B
saravan1992
saravan1992 el 24 de Jul. de 2015
Thank you! It works!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Jul. de 2015

Comentada:

el 24 de Jul. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by