i want to build a database with column and rows

3 ビュー (過去 30 日間)
Bikash
Bikash 2014 年 4 月 16 日
回答済み: Bikash 2014 年 4 月 20 日
The table should have fields
NAME .... AGE .. SALARY
ashok .... 23 .....2300
john ..... . 34 .... 3400
horis ..... 40 .... 6700
and salary is a variable 'n' which changes the salary in the database ,when n gets the value in the command window and update the database .Please suggest
  1 件のコメント
Alberto
Alberto 2014 年 4 月 16 日
I suggest to code your data as as a struct. For example:
D.id(1).Name= 'asrock'
D.id(1).Age= '23'
D.id(1).Salary= '2300'
D.id(2).Name= 'john' ...
I think its really confortable like this.

サインインしてコメントする。

採用された回答

Mischa Kim
Mischa Kim 2014 年 4 月 16 日
編集済み: Mischa Kim 2014 年 4 月 16 日
Bikash, use table, e.g.,
NAME = {'ashok';'john';'horis'};
AGE = [23;34;40];
SALARY = [2300;3400;6700];
T = table(NAME, AGE, SALARY)

その他の回答 (1 件)

Bikash
Bikash 2014 年 4 月 20 日
Thanks !

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by