Recursive function + symbolic + function as parameter

12 Ansichten (letzte 30 Tage)
William
William am 13 Okt. 2014
Beantwortet: William am 14 Okt. 2014
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

Antworten (2)

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

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by