필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Error: Subscripted assignment dimension mismatch

조회 수: 1 (최근 30일)
Abdulhameed Araromi
Abdulhameed Araromi 2020년 8월 28일
마감: MATLAB Answer Bot 2021년 8월 20일
function nn_params = unroll_parameters(parameters)
nn_params = [];
for i = 1: length(parameters)/2
WI = parameters(strcat('W', num2str(i)));
WI_unrolled = (WI(:));
nn_params(:,end+1) = WI_unrolled;
bI = parameters(strcat('b', num2str(i)));
bI_unrolled = (bI(:));
nn_params(:,end+1) = bI_unrolled;
end
I wrote this function to unroll all elements of every keys in a MATLAB map and stor it in an array nn_params. When I use breakpoint within the code, I noticed that whenever it want to append the unrolled, bI_unrolled, it gives the error: Subscripted assignment dimension mismatch.
NB: parameters is a mapp that can contain: W1,b1,W2,b2,...

답변 (0개)

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by