Recursive function + symbolic + function as parameter

2 views (last 30 days)
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

Answers (2)

William
William on 13 Oct 2014
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 on 14 Oct 2014
Re-asking to push this question...

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!