Filling symbolic arrays while setting zeros when filling these arrays since useless variables
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, below a code snippet to fill the symbolic matrixes FISH_BIG_GCsp and FISH_BIG_XC. Unfortunately, I am not filling entirely these 2 arrays and the execution takes a loo long time since I am taking into account unncessary symbolic values.
The ideal would be to have like I do for numerical arrays, that is to say, set zeros(31,31) and fill after the arrays with assignement : that allows me to not take into account (or at least simplify the execution time) the zeros.
But I don't know how to do the same it with symbolic arrays. If someone could help me, this would be fine
Here below the code snippet :
FISH_SYM = sym('xc_', [31,31], 'positive');
FISH_BIG_GCsp = sym('sp_', [31,31], 'positive');
FISH_BIG_XC = sym('xc_', [31,31], 'positive');
% Block bias spectro + pshot and correlations
FISH_BIG_GCsp(1:7,1:7) = FISH_GCsp_SYM(1:7,1:7)
FISH_BIG_GCsp(7:17,7:17) = FISH_GCsp_SYM(7:17,7:17)
FISH_BIG_GCsp(1:7,7:17) = FISH_GCsp_SYM(1:7,7:17)
FISH_BIG_GCsp(7:17,1:7) = FISH_GCsp_SYM(7:17,1:7)
% Block bias photo and correlations
FISH_BIG_XC(1:7,1:7) = FISH_XC_SYM(1:7,1:7)
FISH_BIG_XC(21:31,21:31) = FISH_XC_SYM(11:21,11:21)
FISH_BIG_XC(1:7,21:31) = FISH_XC_SYM(1:7,11:21)
FISH_BIG_XC(21:31,1:7) = FISH_XC_SYM(11:21,1:7)
% Block I.A and correlations
FISH_BIG_XC(18:20,18:20) = FISH_XC_SYM(8:10,8:10)
FISH_BIG_XC(1:7,18:20) = FISH_XC_SYM(1:7,8:10)
FISH_BIG_XC(18:20,1:7) = FISH_XC_SYM(8:10,1:7)
% Final summation
FISH_SYM = FISH_BIG_GCsp + FISH_BIG_XC
댓글 수: 3
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Number Theory에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!