I am trying to convert the following summation into a Matlab function through MuPAD:
This is what I have done so far...
In Matlab, enter
notebook_handle = mupad;
In MuPAD I had formulated the above equation to be :
C = sum(sum(((Xkit)*#P1k), #k=#1..#D), #i=#1..#t-1)
Note: I am equating the summation to a variable CEquate the above expression in MuPAD
In Matlab Command window enter :
C = getVar(notebook_handle,'C')
I am closely following the documentation (Create MATLAB Functions from MuPAD Expressions). I am able to formulate the example given easily but not the one I am trying to solve.
My guess is that there is something wrong with Step 2?