How can I create Arduino code from S-function MATLAB code ?

Hi,

I made the model of a closed-loop control system in Simulink. I used S-function (written in MATLAB code) for my model. Now I'm prototyping my control system on the Arduino. I know MATLAB/Simulink has a Hardware Support Package for Arduino. I have also read about Simulink IO and the External Mode of the support package. But I don't think either of them can help. Simulink IO just accesses the peripherals of the Arduino board and runs the model in PC. And as I understood, the External mode uploads the C code on hardware. But I need to see my code in Arduino IDE to add other features to it later.

Please share your thoughts.

Many Thanks

And a quick search gets

BTW, have fun with AVR-duino floats which are the same as AVR-duino doubles, 32-bits of sand and dirt.

Will they run fast? AVR's have no FPU.

Look into the Teensy 3.6 at pjrc.com. It has an ARM with FPU, 256K RAM and 1M flash, can run a real OS and incorporates SD on the very small board (don't be fooled by pictures, check the actual size).