interpolation using the floor function

6 次查看(过去 30 天)
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