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

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

采纳的回答

Samuel Dickinson
Samuel Dickinson 2015-2-5
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by