Help with Following Error: Function 'subsindex' is not defined for values of class 'cell'.

7 vues (au cours des 30 derniers jours)
In my script I have the following lines of code:
PinputSeries = [TinputSeries(end-inputDelays+1:end),FinputSeries];
PtargetSeries = [TtargetSeries(end-inputDelays+1:end,con2seq(nan(1,N)))];
When I run the script, the first line assigning PinputSeries works fine but an error occurs when the second line is executed. The error is:
Function 'subsindex' is not defined for values of class 'cell'.
I have checked the Newsgroup and shopped around a little for a solution but can't seem to clear this up. Any thoughts would be greatly appreciated.
Best
Sam

Réponse acceptée

Samuel Dickinson
Samuel Dickinson le 5 Fév 2015
Hi,
This is a lesson in not asking question before you've thoroughly checked the code. The issue I was having was that:
PtargetSeries = [TtargetSeries(end-inputDelays+1:end,con2seq(nan(1,N)))];
Should have read:
PtargetSeries = [TtargetSeries(end-inputDelays+1:end),con2seq(nan(1,N))];
The bracket after end corrected the issue.
Thanks

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by