interpolation using the floor function

6 vues (au cours des 30 derniers jours)
s mc
s mc le 8 Juil 2016
Modifié(e) : Stephen23 le 8 Juil 2016
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

Réponse acceptée

Stephen23
Stephen23 le 8 Juil 2016
Modifié(e) : Stephen23 le 8 Juil 2016
This is not accepted MATLAB syntax:
time[floor(t/30)]
The [] operator is used for concatenation. MATLAB array indexing uses ()

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by