フィルターのクリア

Adding a column in particular location

17 ビュー (過去 30 日間)
Neesha
Neesha 2013 年 12 月 16 日
コメント済み: Neesha 2013 年 12 月 16 日
HI,
I have a metrics and I want to add a column with Title and values. I can create that column and do horzcat but that can add a column first or last. I want to add as a 3rd column. How do i do it?

採用された回答

Walter Roberson
Walter Roberson 2013 年 12 月 16 日
[A(:,1:2), B(:), A(:,3:end)]
  3 件のコメント
Walter Roberson
Walter Roberson 2013 年 12 月 16 日
Possibly if you use a "table" you could do that.
Otherwise, you could use ismember() of each column title you wish to refer to, comparing to the cell array of strings of column titles. With the two-output version if ismember() that would give you the numeric column indices that you could then re-arrange.
Neesha
Neesha 2013 年 12 月 16 日
Ok, great, thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by