フィルターのクリア

How to proceed in this case?

2 ビュー (過去 30 日間)
hrushikesh kyathari
hrushikesh kyathari 2019 年 7 月 13 日
コメント済み: dpb 2019 年 7 月 13 日
I have a set of matrices F1,F2,....,F16; each of them is 3*1 matrices.
All these matrices should be stored as
F := [F1,....,F8, 0, ...... ,0;
0,....,F8,F9, ...... ,F16;
0,..,F5,... F12,0,...,0]
and F will be used as k=Z\F;
But I get the error:Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 5-by-1.
I guess we need take use a cell in this case but how to define and also if I use a cell, the calculation Z\F must be done.
The dimensions of Z are good for calculations
  1 件のコメント
dpb
dpb 2019 年 7 月 13 日
"I have a set of matrices F1,F2,....,F16; ..."
Which is the problem -- do not create multiple variables with sequential names, create these as cell array in the beginning.
Then you can deal with them programmatically via cell2mat() or address each as needed.
Probably given the need to build the 2D array a 2D array would be better than just 1...N
You'll have to build the zeros() arrays as well or use sparse() array addressing modes.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by