How to get answers to appear as an array?
7 views (last 30 days)
I have a word that I switched to ASCII code. I then used a loop to make the resulting numbers change to the numbers that I want. My question is: how would I go about making those numbers appear as an array? They currently appear as:
Adam Danz on 26 Jan 2020
Edited: Adam Danz on 27 Jan 2020
It looks like your outputs are being produced within a loop. Instead of displaying their values within the loop, collect the values within a vector (or cell array if the values are not all numeric scalars) and then display the final result after the loop.
See this answer for a demo (but ignore the examples using eval()).