I have a matrix-valued function defined as R which depends on n and I want to define the following algorithm in MatLAB:
$A_{0}=I$ , $B_{0}=0$ , $A_{1}=I$ ,$B_{1}=I$
for $j=1:2m$
$A_{j}= R_{j}A_{j-1}+A_{j-2}$;$B_{j}= R_{j}B_{j-1}+B_{j-2};$
end
$K_{m}=A_{2m}B_{2m}$, I have the following code in MatLAB, it does not work because
of some mismatch assignments. I think I am making some mistakes in the array assignments. I'd appreciate any hints or comments. Thanks
2026-04-03 07:38:54.1775201934
How to define this recursive formula in MatLAB
309 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
Here is an example with cell arrays.