How to i add label to Vector ?

4 ビュー (過去 30 日間)
Faheem Ur Rehman
Faheem Ur Rehman 2021 年 4 月 17 日
コメント済み: Walter Roberson 2021 年 4 月 17 日
I have vectore which dimension is 1024x1. I want to add label in cell. The expected output shoud be in cell which contain
{1024x1} when select that 1024x1 it show all 1024 value
{'bpsk'}
  2 件のコメント
the cyclist
the cyclist 2021 年 4 月 17 日
I don't understand your question. Suppose that instead of a 1024x1 vector, you have a 4x1 vector:
V = [2; 3; 5; 7];
Tell us exactly what output you want, using MATLAB syntax to define it.
Faheem Ur Rehman
Faheem Ur Rehman 2021 年 4 月 17 日
I need that output in workspace

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

採用された回答

Walter Roberson
Walter Roberson 2021 年 4 月 17 日
C{1,1} = randi(9,1024,1);
C{2,1} = 'bpsk';
C
C = 2×1 cell array
{1024×1 double} {'bpsk' }
  3 件のコメント
the cyclist
the cyclist 2021 年 4 月 17 日
Do you really mean that you run the exact code that Walter posted, and it gives you an error? This would be surprising. You can see that that code runs, right here in the forum.
If that is really what you mean, then please restart MATLAB, and try running only that code. It should definitely work.
But maybe you mean you tried to adapt his code to your input, and it didn't work. If that is the case, please post your code here, and we can help debug.
Walter Roberson
Walter Roberson 2021 年 4 月 17 日
You had an existing C that is interfering.
If you are trying to add a label to an existing numeric array, then you cannot do that.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by