Indexing of a temporary array.
2 ビュー (過去 30 日間)
古いコメントを表示
x=(meshgrid([1 2 3],[1 2 3]).*meshgrid([1 2 3],[1 2 3])')
x=x(:)'
Is it possible to carry out the above 2 operations in a single line code. Or in other works is there a way to go around the restriction in Matlab 'A temporary array cannot be indexed'.? Thanks in Advance.
0 件のコメント
採用された回答
Walter Roberson
2012 年 10 月 20 日
x = reshape( (meshgrid([1 2 3],[1 2 3]).*meshgrid([1 2 3],[1 2 3])'), 1, []);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!