Why do i get this error about cell arrays?

for i = 1:1000
P{i+1} = inv(eye(m).*A)*T*P{i}+ inv(eye(m).*A)*B;
P{i+1}=P{i};
end
When i execute this code i get Cell contents reference from a non-cell array object error. Help pls

2 件のコメント

Walter Roberson
Walter Roberson 2013 年 1 月 3 日
What did you set P to before the loop?
Mustafa Alper YILDIZ
Mustafa Alper YILDIZ 2013 年 1 月 4 日
I understood my mistake. I set P wrong. thanks.

サインインしてコメントする。

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 1 月 4 日

0 投票

a=10
a{1}=1 % will give an error
% to avoid error
clear a
a{1}=1

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by