I want to divide every column element . for example 1nd element with 2nd then 2nd with 3rd and so on
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hamza Shahid
am 26 Jan. 2022
Kommentiert: Hamza Shahid
am 26 Jan. 2022
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.
0 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 26 Jan. 2022
Bearbeitet: KALYAN ACHARJYA
am 26 Jan. 2022
#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)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!