Cannot Add Parameters - "Parameter is not floating point and will be cast to double"

I am trying to use the sensitivity analyzer on a golf swing model I have that uses parameters from model workspace. Whenever I try and add parameters to the sensitivity analyzer. Whenever I try and add it says:
"The following parameter(s) are not floating point and will be cast to double: HipConstant"
After saying this it does not add the parameter and does not cast it to double. How do I change my parameters to floating point if that is in fact the issue.
I've tried going into the model workspace and changing parameter data type from auto to double and it doesn't change the behavior.
Edit: I've attached the model and input file to the question.

4 Comments

I tried reproducing this with 'CounterModel' in 'simulinkcoder/GenerateCodeUsingSimulinkCoderExample', but a parameter set with a non-floating point parameter (K) which I moved to the model workspace was getting added in MATLAB R2024a.
If possible, share the reproduction steps so that the community members can look into.
Thanks for the reply. I have attached the model and input file to the question.
I tried to reproduce the issue but getting this:
Error evaluating 'PreLoadFcn' callback of block_diagram 'GolfSwing'.
Callback string is 'cd(matlabdrive);'
Caused by:
matlabdrive is not supported because MATLAB Drive is not available.
@Maven Euler: I fixed it by clearing the PreLoadFcn, and placing ModelInputs.mat in the same folder as the SLX file.

Sign in to comment.

 Accepted Answer

Hi Dieter,
I also faced the same issue with the model you shared in MATLAB R2024a. However, I could successfully add the parameter in MATLAB R2024b. So, I recommend updating to MATLAB R2024b.
I hope it helps.

More Answers (1)

This fixed it. Thank you both so much for your time / help!

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 21 Sep 2024

Answered:

on 24 Sep 2024

Community Treasure Hunt

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

Start Hunting!