Hi everyone!
I have read matrix from the text file and got string like this:
A= 5+6i 3-2i 1-i @ 4+i 2-0.2i 2.5-1.3i @
where @ means it's new row
So I need to write it like this:
A = 5+6i 3-2i 1-i 4+i 2-0.2i 2.5-1.3i
I use this code:
atLocation = find(A=='@');trimmedString = strtrim(A(1:atLocation-1))numNumbers = 1+sum(trimmedString==' ')out = reshape(str2double(regexp(A,'\d*','match')), numNumbers,[])'
But this is working only for numbers. So, when I try this code with complex number it is not working.
If anyone knows where is the problem help me please.
Best Answer