필터 지우기
필터 지우기

how to divide 2 array

조회 수: 3 (최근 30일)
Sourav singh
Sourav singh 2021년 3월 15일
답변: obfish 2021년 3월 15일
U = [0 10 15 20 25 30 35 40 ];
P = [32.91428 30.8628 26.5554 23.45806 22.92738 24.98139 29.61881 36.97433 47.28429];
U_by_p= U/P; % i am writing this in script

채택된 답변

obfish
obfish 2021년 3월 15일
Just use dot-divide for element-wise operation.
U_by_p= U ./ P;
By the way, your vector has incompatible size, you should fix this first.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by