Hi,
Working in the command window, I have painstakingly created a very large symbolic expression F stored as a symbolic variable. F is a function of X and Z, where X and Z are 5element symbolic vectors (X=[x1 x2 .... x5], Z={z1 z2 ... z5]). In addition, I have evaluated the symbolic gradient (GradF, a 5x1 vector) and Hessian (HessF, a 5x5 matrix) of F with respect to X. F is so large that it exceeds the maximum line limit of 25,000 characters, and in fact so does every element of the gradient and Hessian!
I now need to write an iterative program which calculates the values of F, as well as the gradient and Hessian of F at different values of X and Z. Is there a way to do this in an mfile without explicitly entering the formulae in the mfile (which would be nigh on impossible) or having to derive the formulae in the mfile (which is possible but would make for a very slow program). Can I substitue values of X and Z generated in the mfile program into the symbolic variables F, GradF and Hess F saved in the workspace?
Thanks for your help.
Dean
