# Plecs Blockset and matlab

**URL:** <https://forum.plexim.com/t/plecs-blockset-and-matlab/1229>\
**Category:** PLECS\
**Tags:** plecs\_blockset\
**Created:** [April 16, 2023, 9:27am UTC](https://forum.plexim.com/t/plecs-blockset-and-matlab/1229 "2023-04-16T09:27:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatima](https://avatars.discourse-cdn.com/v4/letter/f/f17d59/32.png) [@fatima](https://forum.plexim.com/u/fatima)\
**Post date:** [April 16, 2023, 9:27am UTC](https://forum.plexim.com/t/plecs-blockset-and-matlab/1229/1 "2023-04-16T09:27:28Z")

</div>

Hi all, I want to call a plecs blockset model (matlab simulink) into a script on matlab to do some optimisation technique. What i need some data ( error) from the controller in plecs blockset. I set it as an output and it appears on the similink window, used to workspace but the problem when I run the code and want to call the model, it gives an error which is ( unrecognised error function)-which i have already set an output earlier. Plz any help?-thank you.

---

<div class="post-metadata">

**Author:** ![Kris\_Eberle](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/kris_eberle/32/6_2.png) [@Kris\_Eberle](https://forum.plexim.com/u/Kris_Eberle)\
**Post date:** [April 17, 2023, 4:33pm UTC](https://forum.plexim.com/t/plecs-blockset-and-matlab/1229/2 "2023-04-17T16:33:58Z")

</div>

You would need to at the very least provide a screenshot of the error message, but most likely, also provide your model files, for us to help troubleshot this for you.
