spursfan, excel doesn't support complex numbers so I don't see how this is a matlab problem. You know what excel does when you type =COMPLEX(5,5) and it returns "5+5i"? It creates a string. Try it: =type(complex(1,1)) returns 2 for "text". Any complex matlab function you call from excel can trivially be wrapped by one that accepts x and y and then (in matlab) makes x+i*y before calling whatever it is you need to call. Further, you can return complex values to excel using matlab's "imag" and "real" to bifurcate your return values.fprintf and sprintf are included for the convenience of C programmers and C doesn't have complex numbers either. But this is trivial to work around:fprintf('%7f+%7fi',real(x),imag(x));
Last edited by eredhuin
on June 24th, 2008, 10:00 pm, edited 1 time in total.