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 CenterFile Exchange에서 Loops 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