필터 지우기
필터 지우기

Keeping track of variables

조회 수: 4 (최근 30일)
Sebastian Daneli
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."

채택된 답변

Image Analyst
Image Analyst 2019년 11월 3일
편집: Image Analyst 2019년 11월 3일
No, you really don't need that, or even want that. And here's why: The FAQ
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.
  댓글 수: 1
Sebastian Daneli
Sebastian Daneli 2019년 11월 3일
Thanks for the fast responce

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by