making array in for loop
2 ビュー (過去 30 日間)
古いコメントを表示
for k = 1:10000
[Score(k), Alignment{k}] = nwalign(p546ref,newones{k});
find_start_stop(Alignment);
find_every_deletion(Alignment);
end
this has "Unable to perform assignment because brace indexing is not supported for variables of this type." error. Why is that?
Score is integer and Alignment is 3x158 char array.
2 件のコメント
Shubham Gupta
2019 年 11 月 8 日
Alignment should be a cell type array to use
Alignment{k} % notice curly paranthesis, it is used cell type arrays.
採用された回答
James Tursa
2019 年 11 月 8 日
Maybe prior to the loop define Alignment as a cell array to hold your results:
Alignment = cell(10000,1);
1 件のコメント
Shubham Gupta
2019 年 11 月 8 日
But using this means, losing the original data of Alignment which is a char array of (3x158)?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!