unable to perform assignment because the left and right sides have a different number of elements , vect problem

조회 수: 1 (최근 30일)
can some one plz explain tome that !
  댓글 수: 2
amani
amani 2024년 9월 7일
i do vec_SNR_dB(i) = vec_EbN0_dB (i) + 10( mod_order)
it word but i don't know if it is correct or no !
Torsten
Torsten 2024년 9월 7일
Maybe you should pass MATLAB Onramp, an introductory course free of costs to learn the basics of the new language:

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2024년 9월 7일
vec_EbN0_dB is an entire vector.
On the statement
vec_SNR_dB(i) = vec_EbN0_dB + log10( mod_order)
you are using the entire vector vec_EbN0_dB on the right hand side, so the right hand side is an entire vector. The left hand side can only store a single element.
However,
vec_SNR_dB(i) = vec_EbN0_dB (i) + 10( mod_order)
is an incorrect expression because it is not possible to index the constant 10 at a particular location mod_order, and MATLAB has absolutely no implied multiplication.

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by