フィルターのクリア

Unable to perform assignment because the left and right sides have a different number of elements.

1 回表示 (過去 30 日間)
for i=1:100
s_code1(i)=strcat(s_code(2*i-1,:),s_code(2*i,:));
end
c1=cross(s_code1,100);

採用された回答

KSSV
KSSV 2020 年 10 月 8 日
編集済み: KSSV 2020 年 10 月 8 日
s_code = cell(100,1);
for i=1:100
s_code1{i}=strcat({s_code{2*i-1},s_code{2*i});
end
  5 件のコメント
KSSV
KSSV 2020 年 10 月 8 日
What is s_code? In the answer..it is initialized ..so it cannot work...
Kanika Bhalla
Kanika Bhalla 2020 年 10 月 9 日
Hi KSSV. Thanku for the response.Let me try something and will share the code with you.

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

その他の回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 10 月 8 日
If you are using R2016b or later, you can also try the following
s_code1 = strings(1, 100)
for i=1:100
s_code1(i)=strcat(s_code(2*i-1,:),s_code(2*i,:));
end
  3 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 10 月 8 日
Can you share the value of s_code in a .mat file? Also, can you paste the code you tried running?
Kanika Bhalla
Kanika Bhalla 2020 年 10 月 9 日
Hi Ameer Hamza. Thanku for the response.Let me try something and will share the code with you.

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

カテゴリ

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