how do i display this particular matrix in a separate text file in the below mentioned format?

13.4033 -5.0000 0 -5.0000 -3.3333 0 -5.0000 27.4383 -4.0000 -10.0000 -3.3333 -5.0000 0 -4.0000 17.9112 0 -3.8462 -10.0000 -5.0000 -10.0000 0 17.5700 -2.5000 0 -3.3333 -3.3333 -3.8462 -2.5000 16.4912 -3.3333 0 -5.0000 -10.0000 0 -3.3333 18.3983

답변 (1개)

Use the code below after adding your filename with its path:
clc
clear
filename = 'your_filename.txt';
FileID = fopen(filename,'r');
C = fscanf(FileID,'%g',[1 inf]);
disp(C)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2013년 4월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by