MATLAB: If i want to change each value 1 in a matrix to 0 how to do that matlab function a=[1 2 3;1 3 3;2 1 2] is there a function that make a as below b=[0 2 3;0 3 3;2 0 2] Best Answer b = a;b(b==1) = 0; Related SolutionsMATLAB: How to plot that phi=.1;%not sure what you whatalpha=2*log(10);f=4;A=1;t=0:.001:1;f=@(t)A*exp(-alpha*t).*cos(2*pi*f*t+phi);plot(t,f(t)); MATLAB: Can you help me solving that How about:A = [1 2 3 4 5 6];b = [1 2 3];C = zeros(size(A'*b));for ii = 1:length(A) C(ii,:) = b + A(ii);end Related QuestionThe answer is like thatWhat kind of formula is thatTry to keep track of the plot in a loop? how to do thatWriting a variable and reading it elsewhere, how to do that
Best Answer