matlab - replacing a value in all columns with value of that column -


How do I change all the 1s in all the columns with the number of that column? I can already make columns with columns:

Output (output (:, 3) == 1,3) = 3; Output (output (,, 4) == 1,4) = 4;
Output (output (,, 5) == 1,5) = 5; # Etc ...

But I think writing an idiot for every single column.

You can use it for:

  [rowIdx, ColIdx] = address (output == 1); Output (output == 1) = colled;    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -