How to assign a string with a value in repmat?

5 ビュー (過去 30 日間)
Samuel Davies
Samuel Davies 2015 年 9 月 15 日
コメント済み: Samuel Davies 2015 年 9 月 16 日
I have a value, A = -1. I want to use repmat as so:
B = repmat('A',1,2);
but this gives me [A,A] and not [-1,-1] as I want it to. Seems very simple but I cannot get it. Help please. Thank you.

採用された回答

Walter Roberson
Walter Roberson 2015 年 9 月 15 日
B = repmat(A,1,2)
  1 件のコメント
Samuel Davies
Samuel Davies 2015 年 9 月 16 日
Haha, thanks Walter.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by