Recursive function + symbolic + function as parameter

조회 수: 12 (최근 30일)
William
William 2014년 10월 13일
답변: William 2014년 10월 14일
Hello,
I am a new user of matlab. I am tring to convert my code from Mathematica. I want to compute this formula:
<<latex-codecogs-com-gif-latex--5Cdpi-7B200-7D-20-5Cnewline-20R_-7Bl-2Cu-7D-3DF_-7Bl-2C-5Calpha_-7B-28l-1-29-2Cu-7D-7D-5Cleft-20-28-20-5Csum_-7Bi-3D1-7D-5E-7BC-28l-1-29-7D-5Cleft-20-28-20-5Calpha_-7B-28l-1-29-2Ci-7DR_-7B-28l-1-29-2Ci-7D-20-5Cright-20-29-20-5Cright-20-29-20-5Cnewline-20R_-7B0-2Ck-7D.3DI_k>>
The I_k are Inputs (scalar), alphas must be symbolic variable (scalar) and Fs must be a function as parameter.
Now it is hard to implement that.
I am asking to the community for help.
What I explore: - symsum - the @ to pass function - sym/syms - recursive function
But after multiple days I did find a way do that.
The objectif is producing a function taking an array (all I_k) and array of all F this function should give me an array of the expression.
To implement that on Mathematica that take only 10 lines. The entering cost on Matlab are little bit higher than Mathematica. But I want to use different function doesn't exist on Mathematica.
Thanks
William

답변 (2개)

William
William 2014년 10월 13일
Additionnal information all l are from an array: [4 5 6] <= l_0 == 4 (so we have 4 I_k), l_1 == 5 and l_2 == 6 so the final result will be an array with 6 cells...

William
William 2014년 10월 14일
Re-asking to push this question...

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by