How to divide whole string with specific number?

2 vues (au cours des 30 derniers jours)
vimal kumar chawda
vimal kumar chawda le 13 Déc 2021
Modifié(e) : the cyclist le 13 Déc 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 ?

Réponse acceptée

the cyclist
the cyclist le 13 Déc 2021
Modifié(e) : the cyclist le 13 Déc 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

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by