interpolation using the floor function

4 ビュー (過去 30 日間)
s mc
s mc 2016 年 7 月 8 日
編集済み: Stephen23 2016 年 7 月 8 日
When I try to run this line of code I keep getting an error saying Unbalanced or unexpected parenthesis or bracket.
e= (((t-time[floor(t/30)])/(time[floor(t/30)+1]-time[floor(t/30)]))*e1) + (((time[floor(t/30)+1]-t)/(time[floor(t/30)+1]-time[floor(t/30)+1))*e0)
I was just wondering if anyone knows what I have done wrong as I cannot seem to get it to run.
Thanks

採用された回答

Stephen23
Stephen23 2016 年 7 月 8 日
編集済み: Stephen23 2016 年 7 月 8 日
This is not accepted MATLAB syntax:
time[floor(t/30)]
The [] operator is used for concatenation. MATLAB array indexing uses ()

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by