How can I create a new variable after replacing some data from old variable?
Show older comments
% firstly,I have
A = [1 2 3 4 5; 6 7 8 9 10]
% then replace some value
A(A>3)=-999
%I would like to have
B= [1 2 3 -999 -999; -999 -999 -999 -999 -999] in the workspace.
%How to create independent B from edited A?
%Please advise
Accepted Answer
More Answers (0)
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!