MATLAB: Merge number and character character hi, how i can merge this x=3 y='-' when do z=[x y] i get z = – this symbol is appearing as square in command of matlab i need the result be 3 – how get that? thanks Best Answer You cannot. Anyone one array can be numeric or character, but not both at the same time.Perhaps you wantz = [num2str(x) y]; Related SolutionsMATLAB: How to express a symbolic variable in function of other symbolic variables, With newer MATLAB versions, you can usesyms f(y,z)f(y,z) = x^2+y^3; MATLAB: Simplify(~(~(x | y) & ~(y | z))) Remember these equivalences ( De Morgan's laws ): ~(x | y) <==> ~x & ~y ~(x & y) <==> ~x | ~yThen~(~(x | y) & ~(y | z)) ==>~((~x & ~y) & (~y & ~z)) ==>~(~x & ~y) | ~(~y & ~z) ==>~~x | ~~y | ~~y | ~~z ==>x | y | y | z ==>x | y | zApplying the operations from the outside to the inside is faster:~(~(x | y) & ~(y | z)) ==>~~(x | y) | ~~(x | z) ==>x | y | y | z Related QuestionHandle character minus characterMerge values of a vectorMerge array to a number
Best Answer