MATLAB: Making numbers equal to a definite value

equaliltyhomeworknumbers

I have an array of numbers such as- 95, 48, 30 and 51. I need to make these equal to 50 using different factors. How can I do that using loop without doing it manually? Need to know the multiplication factors that making all these numbers equal to 50. Don't want any definite answers. Just need a heads up in the right direction.

Best Answer

array(ismember(array,[95, 48, 30, 51])) = 50
P.S: Didn’t realise it was a homework question. However it requires a loop. Mohammed come up with a solution using loop to get your homework done as by the requirements.
Related Question