I want to divide every column element . for example 1nd element with 2nd then 2nd with 3rd and so on

1 回表示 (過去 30 日間)
I want to find the commulative division of a coulumn. For example, divide 1st column element with 2nd element and then 2nd with 3rd. Can anybody help me.

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2022 年 1 月 26 日
編集済み: KALYAN ACHARJYA 2022 年 1 月 26 日
#data is a column/row vector
data1=circshift(data,[0 -1]);
temp=data./data1;
#Ignoring last element, as devide present by next one
result=temp(1:end-1)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by