I currenty have this code:
C = serial('COM9'); %#ok<SERIAL>
fopen(C);L = reshape(fscanf(C,'%f, '),[4,4])
And it outputs the following:
L = 74.8000 74.8000 74.8000 74.8000 74.7000 74.8000 74.8000 74.5000 74.7000 74.3000 74.5000 74.7000 74.7000 74.7000 74.7000 74.5000
How can I can matlab to return the above data like this? (with the 2 brackets and semicolons)
L = [ 74.8000 74.8000 74.8000 74.8000; 74.7000 74.8000 74.8000 74.5000; 74.7000 74.3000 74.5000 74.7000; 74.7000 74.7000 74.7000 74.5000 ]
I need it to be this way so that I can plot the data using a grid.
Thank you in advance.
Best Answer