How to divide whole string with specific number?

조회 수: 1 (최근 30일)
vimal kumar chawda
vimal kumar chawda 2021년 12월 13일
편집: the cyclist 2021년 12월 13일
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 ?

채택된 답변

the cyclist
the cyclist 2021년 12월 13일
편집: the cyclist 2021년 12월 13일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by