Suscripted Assignment in to Mxarray is not supported for code generation
이전 댓글 표시
Gamma=zeros(n_y*Np,n);
cont=1;
for k=1:n_y:n_y*Np
row_i=k;
row_f=k+n_y-1;
Gamma(row_i:row_f,:)=C*A^(cont);
cont=cont+1;
end
outputs.
Error:Subscripted assignment into an mxArray is not supported for code generation.
Function 'MATLAB Function' (#484.1885.1905), line 85, column 5:
"Gamma(row_i:row_f,:)"
Launch diagnostic report.
댓글 수: 2
Shivam Gothi
2024년 9월 6일
Can you please share the complete code so that I can reproduce the error from my end and try to get a possible work around for it?
Walter Roberson
2024년 9월 6일
I notice that each iteration of the loop, it sets n_y rows to a value, and the next iteration overwrites all but one of the rows. This feels like a waste of time.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Function Definition에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!