Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to calculate new column values by using present_value and present_value -1?

3 ビュー (過去 30 日間)
Anaya Kharwadkar
Anaya Kharwadkar 2020 年 10 月 1 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a 312x1 vector, called v(t). I want to calculate a new vector such that new(t) = v(t)/v(t-1). How do I go about this? How do I call the previous element of the vector?
(I am sorry if this is a basic question, but I am new to programming and would appreciate an help)

回答 (1 件)

madhan ravi
madhan ravi 2020 年 10 月 1 日
v(2:end) ./ v(1:end-1)
I would suggest you to do MATLAB On-ramp Course.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by