how to increase the decimal place and it must be side to side as below
1 view (last 30 days)
Show older comments
The matrix is not strictly diagonally dominant at row 1(ignore this)
approximated, exact=
0.18221-0.73861i 0.18233-0.73524i
0.0032185-0.22997i 0.0022028-0.22863i
========================================
answer of my code is below it must be like the above answer
approximated=
0.1822 - 0.7386i
0.0032 - 0.2300i
exact=
0.1823 - 0.7352i
0.0022 - 0.2286i
=============================================
0 Comments
Answers (1)
dpb
on 29 Mar 2021
fmt=['%0.4f%+0.4fi\t%0.4f%+0.4fi\n'];
>> for i=1:size(approx,2)
fprintf(fmt,real(approx(i)),imag(approx(i)),real(exact(i)),imag(exact(i)))
end
0.1822-0.7386i 0.1823-0.7352i
0.0032-0.2300i 0.0022-0.2286i
>>
Will leave adding header line as exercise...
0 Comments
See Also
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!