In an assignment A(I) = B, the number of elements in B and I must be the same.

1 回表示 (過去 30 日間)
Yulia M
Yulia M 2019 年 11 月 8 日
コメント済み: Yulia M 2019 年 11 月 11 日
Hi ,
I am new to MATLAB, I need help with this problem please help!
I'm trying to do this operation.
A is 256 * 1 double
B is 18 * 1 complex double
I am trying to do
A (17: 240) = B;
But I am getting this error! what might be the reason?
"In assignment A (I) = B, the number of elements in B and I must be the same."
  3 件のコメント
Yulia M
Yulia M 2019 年 11 月 11 日
Thank you all for the valuable answers!

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

採用された回答

Shubham Gupta
Shubham Gupta 2019 年 11 月 8 日
Your:
A(17:240) % is a vector of 224 elements ((240-17+1)x1)
while
B % is a vector of 18 elements (18x1)
that's why you are getting the error

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by