t=timer('timerfcn',@(x,y)disp(x(2,2)) this line is incorrect ,it should have been t=timer('timerfcn',@(x1,y)disp(x(2,2)) instead.
Index in position 1 exceeds array bound (must not exceed 2) error
5 ビュー (過去 30 日間)
古いコメントを表示
>> x=rand(5,5)
x =
0.8594 0.8865 0.7127 0.0424 0.8175
0.8055 0.0287 0.5005 0.0714 0.7224
0.5767 0.4899 0.4711 0.5216 0.1499
0.1829 0.1679 0.0596 0.0967 0.6596
0.2399 0.9787 0.6820 0.8181 0.5186
>> t=timer('timerfcn',@(x,y)disp(x(2,2)))
t =
Timer Object: timer-6
Timer Settings
ExecutionMode: singleShot
Period: 1
BusyMode: drop
Running: off
Callbacks
TimerFcn: @(x,y)disp(x(2,2))
ErrorFcn: ''
StartFcn: ''
StopFcn: ''
>> start(t)
Error while evaluating TimerFcn for timer 'timer-6'
Index in position 1 exceeds array bounds (must not exceed 1).
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!