Suppose, one of the my columns in my excel data as follows:
'G1(f1) : Resulting Value = 0.5' 'G1(f2) : Resulting Value = 1' 'G1(f3) : Resulting Value = 1.5' 'G1(f4) : Resulting Value = 2' . . . 'G1(f8) : Resulting Value = 4'
I'd like to separate the values that 0.5, 1 … 4 as double!
I have tried the code below:
plotdata=xlsread('S:/PLOT/PLOT.xlsx');[num, txt] = xlsread('S:/PLOT/PLOT.xlsx', 'B4:B43');[rows,cols]=size(txt);uplim=plotdata(2,2); %this cell gives number of 'Resulting Value's
k=1;for i=4:uplim+4-1 [dummy(k), txt(k)] = strtok(txt(k), '='); mylist(k)=strtok(txt(k),'= '); k=k+1; i=i+1;end
This code gives "mylist" as 1×8 cell!
THE PROBLEM is that I can not use "mylist" for arithmetic operations. How can I turn "mylist" from cell to a matrix or a vector that I can use for arithmetic operations.
Or I'm open to new codes to separate the values that 0.5, 1 … 4 as double!
Best Answer