save data in a tabel with some column
이전 댓글 표시
Hello... :) I want to save a data from 2 textfields.. 1st textfield, save data as "X" 2nd textfield, save data as "Y"
How i can save them in a tabel, that have 3 columns..?? 1st column show the number series.. 2nd column show value of "X" 3rd column show value of "Y"
Like this..
----------------------
| No | X | Y |
----------------------
| 1. | 64 | 76 |
| 2. | 45 | 12 |
etc
Thank You before... :)
댓글 수: 3
Ilham Hardy
2012년 5월 15일
What is textfields mean exactly?
Is the textfields from GUI?
Walter Roberson
2012년 5월 15일
Is this table to be displayed on the command window (as text) or in a file (as text), or are you using a uitable() ?
Rahma Yeni
2012년 5월 15일
답변 (1개)
Andrei Bobrov
2012년 5월 15일
data = ...
dataset({[64, 76; 45, 12],'X','Y'},'ObsNames',cellstr(num2str((1:2)','%-d.')))
OR
dataset({[(1:2)',[64, 76; 45, 12]],'Serial_Number','X','Y'})
댓글 수: 3
Rahma Yeni
2012년 5월 15일
Walter Roberson
2012년 5월 15일
.mat files are binary files and are not any particular shape... definitely not "table like".
MATLAB numeric matrices cannot have column headers or row headers.
Rahma Yeni
2012년 5월 15일
카테고리
도움말 센터 및 File Exchange에서 Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!