Author Topic: .mat file to csv conversion  (Read 2627 times)

0 Members and 1 Guest are viewing this topic.

Offline KaramelTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: tr
.mat file to csv conversion
« on: April 07, 2018, 05:50:31 pm »
Hi,

I am trying to convert .mat file to csv on Matlab. It is very simple but I am getting an error csvwrite command.

Mycodes,

Code: [Select]
y = load('data.mat');
csvwrite('test.csv', y);

csvwrite line gives this error : Error using csvwrite (line 2) Undefined function 'real' for input arguments of type 'struct'.

However, my .mat file have no any problem. Each cells has a variable which are real number.

Why does Matlab give this error?
 

Offline KaramelTopic starter

  • Regular Contributor
  • *
  • Posts: 178
  • Country: tr
Re: .mat file to csv conversion
« Reply #1 on: April 07, 2018, 06:04:08 pm »
I loaded manually (with clicking data.mat) file to workspace. After that, immediately, problem has been solved.  :palm:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf