MATLAB: Plotting a cellArray Issue

cellarrayplot

Hello,
I have a cellarray thats for example: cellArray = {1X8}; and each cell is 1X1023. But im having issues plotting this. Ive tried cell2mat. But this just returns a giant char array:
c = '205020502049205020512051205120…………'
I tried seperating every 4 chars and plotting but failed. Im trying to read values from a arduino serial port from one of its analog inputs. Ive tried cellfun(@plot,cellArray); and plot(cellArray{1,1}); but get invalid first argument errors…..at a bit of a loss, and I know its a simple solution just stuck.

Best Answer

Hi m j,
Can you try something like this?
celldata(j) = str2num(x)
By doing this you are just storing them as numbers but not as str cell. and you can easily plot.