How to copy a complex matrix in the workspace to an m-file?
1 次查看(过去 30 天)
显示 更早的评论
I need to copy a large complex matrix from the workspace to be saved in m-file as a matrix (notice the complex sign (i or j or 1i) is not multiplied by (*). Part of the matrix is shown in the picture below.
Notice that I cannot use the code used for generating the matrix in the place (m-file) I work on for some complexity reason. Thanks in advance for your help
7 个评论
Adam
2017-6-14
Does Excel itself even support complex data? You can separate it into real and imaginary parts and save those to their own columns.
采纳的回答
KSSV
2017-6-14
A = rand(5) ;
B = rand(5) ;
C = A+1i*B ;
C_str = num2str(C);
C_cell = cellstr(C_str);
xlswrite('test.xlsx',C_cell)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!