Keeping track of variables
6 ビュー (過去 30 日間)
古いコメントを表示
Sebastian Daneli
2019 年 11 月 3 日
コメント済み: Sebastian Daneli
2019 年 11 月 3 日
In short, i've written a script that moves around colums in matricies and vectors. Now I need to be able to keep track of it all. I need to be able to assign a name to each column, say x1, x2 etc, so that I easily can determine where they all end up. This is what I've tried so far:
cN=[x1 x2]'==[2 1]';
But i end up with this message: "Input arguments must be convertible to floating-point numbers."
0 件のコメント
採用された回答
Image Analyst
2019 年 11 月 3 日
編集済み: Image Analyst
2019 年 11 月 3 日
If you want to keep track of the new destinations of the values you sent an element at a particular (row, column) to, then just make two matrices that record where the values went to
newColumns(row, col) = newColumn; % Record the new column of this element of the matrix.
newRows(row, col) = newRow; % Record the new row of this element of the matrix.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Special Values についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!