Error because the size of the left side is 4-by-4 and the size of the right side is 1-by-4.

조회 수: 1 (최근 30일)
I am experiencing this error.
t is defined as t=1 and the priginal data fed to the program is 116x4
Unable to perform assignment because the size of the left side is 4-by-4 and the size of the right side is
1-by-4.
Error in dcc (line 139)
data(:,:,t) = data2d(t,:).*data2d(t,:);

채택된 답변

KSSV
KSSV 2021년 7월 16일
data(1,:,t) = data2d(t,:).*data2d(t,:);
This is saving the data into initialized matrix problem. You need to check the dimensions of initialized matrix and the matrix which you are going to save into it.
In your line RHS is expecting matrix and you are saving a 1*4 matrix.
  댓글 수: 1
Tilman Zottl
Tilman Zottl 2021년 7월 16일
Thank you so much for the help. This worked, however I am now encountering a subsequent error.
Error using normlike (line 42)
First input must be a vector with 2 elements.
Do you have any idea how to counter this?
This is teh corresponding code and it is sstill about teh same dataset. Thanks for all the help
[LL, LLS] = normlike(data,0,ht);
LLS = -LLS;
LL = -LL;

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by