How to show word from excel?

1 回表示 (過去 30 日間)
Eddy Iswardi
Eddy Iswardi 2020 年 3 月 28 日
コメント済み: Eddy Iswardi 2020 年 3 月 29 日
I want to show the word from excel. But I don't know how to show it. This is my code.
clc;
clear all;
T=readtable('EVASUSANTIDATA.xlsx');
x1=T.PENDAFTARAN;
x2=T.TUNDA;
x3=T.KUOTA;
y=T.LAMA;
For example, I want to get this result:
KOTA KUOTA LAMA
KOTA BENGKULU 311 21
it's the data number one in excel. With 'KUOTA' is 'x3' and 'LAMA' is 'y'

採用された回答

Peng Li
Peng Li 2020 年 3 月 28 日
編集済み: Peng Li 2020 年 3 月 28 日
subT = T(T.NO == 1, [2 5 6]);
Will be the first record with the 2nd 5th and 6th variable as a new table.
  17 件のコメント
Walter Roberson
Walter Roberson 2020 年 3 月 29 日
In the code
T(1:4, [2 5 6])
The [2 5 6] does not refer to values of KUOTA that are to be matched: the [2 5 6] refers to column numbers in the table. So when you were talking about T(1:4, [2 d 6]) then you were talking about extracting a different set of column numbers.
Anyhow:
nT = T(1:4, [2 5 6]);
nT{:,2} = d(:);
Eddy Iswardi
Eddy Iswardi 2020 年 3 月 29 日
thanks. you guys are very helpful. now I know how to manipulate views like this in the future.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by