save data in mat-file or saved ordered

Hello all.. :) Like my question before,, http://www.mathworks.com/matlabcentral/answers/38394-save-data-in-a-tabel-with-some-column, i'm not satisfied for the answer.. I want to show the data like this
| X1 | Y1 |
| X2 | Y2 |
| X3 | Y3 |
and so on
value of X, i get from 1st textfield in GUI, and value of Y, from 2nd textfield.. I only show them in ordered,, How i can make it... I hope, it can save in mat-file... Thank You before,,, :) I need your help...
I have seen from http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F, but i don't know how to implement it to my problem.. :(

Respuestas (1)

Walter Roberson
Walter Roberson el 24 de Mayo de 2012
fmt = '| %2f | %2f |\n'; %change the 2 to the desired width
sprint( fmt, [X(:), Y(:)].' )

3 comentarios

Rahma Yeni
Rahma Yeni el 25 de Mayo de 2012
Thank you for your answer Mr. Walter..
Base on your answer, i want to make it in a table (like mat-file)...
So, the sum of mat-file, same as how many time i pressed a button...
i want make the data saved recursive...
is possible Sir..???
Thank you before..
Walter Roberson
Walter Roberson el 25 de Mayo de 2012
No, file I/O cannot be done recursively, especially not on MS Windows.Use sequential saving instead.
Rahma Yeni
Rahma Yeni el 25 de Mayo de 2012
How to make it sequential sir...?? I think, it's suitable with my problem...
Thanks..

La pregunta está cerrada.

Etiquetas

Preguntada:

el 23 de Mayo de 2012

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by