How to divide whole string with specific number?

2 visualizzazioni (ultimi 30 giorni)
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 ?

Risposta accettata

the cyclist
the cyclist il 13 Dic 2021
Modificato: the cyclist il 13 Dic 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

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by