Home > Software engineering >  For help: "the child processes or functions undefined"
For help: "the child processes or functions undefined"

Time:09-15


Run MATLAB with "ExliSamp. XLS document
"
Run time stays in the first row: Function CurveFit (aData, sTarget1 sTarget2, sTarget3)


The Function CurveFit (aData, sTarget1 sTarget2, sTarget3)
'the MATLAB regression and curve fitting macro

MLPutMatrix "data", aData
MLEvalString "y=data (:, 3)"
MLEvalString "n=length (y)"
MLEvalString "e=ones (n, 1)"
MLEvalString "A=data (:, 1:2) [e]"
MLEvalString beta=A \ "y"
MLEvalString "fit=A * beta"
MLEvalString "[the] y, k=sort (y)"
MLEvalString "fit=fit (k)"
MLEvalString "(p, S)=polyfit (1: n, y ', 5)
"MLEvalString "newfit=polyval (p, 1: n, S) '"
MLEvalString "plot (1: n, y, 'bo', 1: n, fit, 'r:', 1: n, newfit," g "); Legend (' data ', 'fit' and 'newfit')
""Y", MLGetMatrix sTarget1
MLGetMatrix "fit", sTarget2
MLGetMatrix newfit, sTarget3

End the Function

CodePudding user response:

Estimate the matlab not call up
MLPutMatrix
This function is not found

CodePudding user response:

reference 1st floor caozhy response:
estimated matlab not call up
MLPutMatrix
This function is not found


Now that is "shipped", should be "library"...
I think probably the building of the system, the matlab type library is not properly cited,
(probably there is something wrong with the software installation, and may even what is "green edition", cracked versions, such as the type library without registration)
Cause the VBA code "reference is lost", hence the MLPutMatrix "undefined",
  •  Tags:  
  • VBA
  • Related