MATLAB Help: Convert MATLAB Data to C# for XNA Game

  • Thread starter Thread starter li4ngx
  • Start date Start date
  • Tags Tags
    Data Matlab
AI Thread Summary
To use data from MATLAB in a C# XNA game, exporting the MATLAB output as a .txt file is a viable approach. The process involves using the fprintf function in MATLAB to save the desired data to a text file. In C#, standard file I/O methods can then be employed to read and process this data for game controls. This method effectively facilitates the integration of MATLAB-generated data into a C# environment.
li4ngx
Messages
1
Reaction score
0
matlab data to c# help!

hi,

i am trying to use data obtained from MATLAB as input for controls of a simple game in c# xna.

i am thinking of extracting the output from MATLAB as .txt file, which will be read and process by c#. Am I on the right direction, and how do I go about doing so?

Thanks in advance.

Regards.
 
Physics news on Phys.org


You can use fprintf to save to file in MATLAB and then use whatever file I/O is in C# to read the data in.
 

Similar threads

Replies
4
Views
4K
Replies
2
Views
3K
Replies
5
Views
3K
Replies
4
Views
3K
Replies
5
Views
2K
Replies
2
Views
2K
Replies
12
Views
2K
Back
Top