Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert .mat file into .txt file containing a matrix of 1088 rows and 832 columns?

Tags:

matrix

matlab

I'd like some help with my Matlab problem. I'm working on macOS with Matlab R2016b. I want to convert a .mat file containing a matrix of 1088 rows and 832 columns into a .txt file.

I tried the above code without success.

load('H.mat')
dlmwrite('H.txt')

By loading the matrix on matlab I find the following informations :

a

Thank you.

like image 422
m2016b Avatar asked Nov 17 '25 13:11

m2016b


1 Answers

dlmwrite is not recommended by matlab: Better use

load('H.mat')
writematrix(H, 'H.txt') 

see writematrix documentation.

like image 147
BitLauncher Avatar answered Nov 20 '25 14:11

BitLauncher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!