interpolation using the floor function

조회 수: 6 (최근 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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by