good
function z = mysub(x,y)
z = num2str( str2num(x) - str2num(y) );
end
why this is not working for this code?
Nice
Hi. My code only prints out '-' for a negative number but not '+' for a positive. Can anyone help? function Z = mysub(X,Y); W = (str2num(X))-(str2num(Y)); Z = num2str(W); end
actually each of them has 14 characters or less...15 if we count the signs.
Mark Sanderson, if W > 0 Z = ['+' ...]
piece of cake
+-=
string to double and sprintf
Need to calculate the difference ... not the sum! :)
Sorry for this...just had to try regexp. Somehow, the size of this is calculated completly wrong.....
Swap the first and last columns
12447 Solvers
Find the peak 3n+1 sequence value
1108 Solvers
451 Solvers
Pernicious Anniversary Problem
735 Solvers
Matlab Basics - Convert a row vector to a column vector
427 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!