How can I loop row by row?

So I have Model Data and Survey Data. I would to check error with iteration formula as following Excel below.
First iteration, I have to check error by subtracting data model 1 2 3 4 5 6 with data survey 1 2 3 4 5 6, and i calculate the error. And i find the error is 479
i=1 RMS = model(1)-survey(1)
Second iteration, I check error by subrtacting data model 2 3 4 5 6 7 with data survey 1 2 3 4 5 6, and i calculate the error. I find the error is 158
i=2 RMS = model(2)-survey(1)
Iteration will stop after last data model - last data survey (in fifth iteration).
i=5 RMS = model(5)-survey(1)
Thanks before

3 件のコメント

darova
darova 2020 年 3 月 30 日
I want to help you but don't know how
Do you have any ideas?
Anita Fitriani
Anita Fitriani 2020 年 4 月 2 日
My idea just
RMS(m,n) = model(m,n) - survey(m+1,n)
darova
darova 2020 年 4 月 2 日
Do you know how for loop works?

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimscape Multibody についてさらに検索

質問済み:

2020 年 3 月 30 日

コメント済み:

2020 年 4 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by