How to divide whole string with specific number?

1 visualización (últimos 30 días)
vimal kumar chawda
vimal kumar chawda el 13 de Dic. de 2021
Editada: the cyclist el 13 de Dic. de 2021
A = [1 2 3 4 5 6 7 8 9];
A_2 = A/2;
divide = [6 7 8 9 6 3 4 2 5]
divide = 1×9
6 7 8 9 6 3 4 2 5
results = A/divide
results = 0.6781
Output should be string but I am getting only one value. How to divide whole string ?

Respuesta aceptada

the cyclist
the cyclist el 13 de Dic. de 2021
Editada: the cyclist el 13 de Dic. de 2021
A = [1 2 3 4 5 6 7 8 9];
A_2 = A/2;
divide = [6 7 8 9 6 3 4 2 5];
results = A./divide
results = 1×9
0.1667 0.2857 0.3750 0.4444 0.8333 2.0000 1.7500 4.0000 1.8000

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by