Running Robotics Toolbox Script 'mdl_planar3' from MATLAB Function block

4 views (last 30 days)
After running the script 'startup_rvc' in MATLAB, I have created a Simulink model with a PreLoadFcn: mdl_planar3, which helps me initialize and load 3 link planar mechanism's variables in MATLAB workspace from 'mdl_planar3.m' file.
The Simulink model is as shown:
with the Function Block's code:
When I try to run this code, its giving me several error's as shown below, mainly it does not recognize 'p3', which is already defined in Workspace.
Can someone please tell me how to fix it and run the Simulink model successfully?
Thanking You Harshil

Answers (0)

Community Treasure Hunt

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

Start Hunting!