Add text column to data

8 ビュー (過去 30 日間)
Kyung Won Chang
Kyung Won Chang 2017 年 5 月 30 日
回答済み: Azzi Abdelmalek 2017 年 5 月 30 日
Dear whom regards, I'd like to add a text column (on the left side) to my given data (10x3 double) generated through my loop. So, currently I have the following format of data
1 1 1
1 1 2
1 1 3
1 1 4
1 2 1
1 3 1...
So, my desired data format is
COORDINATE 1 1 1
COORDINATE 1 1 2
COORDINATE 1 1 3
COORDINATE 1 1 4
COORDINATE 1 2 1
COORDINATE 1 3 1...
Any tips would be grateful. K-Won

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2017 年 5 月 30 日
A=[1 1 4
1 2 1
1 3 1]
B=repmat({'coordinate'},size(A,1),1)
out=[B num2cell(A)]

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by