image thumbnail

updated 13 days ago

C-mex S-function interface to Natural Point Motive (Optitrack) in Simulink by Or Hirshfeld by Or Hirshfeld

C-mex S-function interface to Natural Point Motive (Optitrack) in Simulink by Or Hirshfeld (simulink, api, c)

image thumbnail

updated 4 months ago

Calling Shared Libraries from Simulink by Mikhail

Mikhail (view profile)

This paper discusses several approaches for calling shared libraries from Simulink models (simulink, legacy code tool, lct)

Calling Shared Libraries from Simulink

exlib

simlib_test_dyn.slx

image thumbnail

updated 10 months ago

S-Function file for Inverted Pendulum system by Namrajit Dey

S-function simulink error: during flag=1 call must be a real vector of length 4. (simulink, control design, sfunction)

sfunc_invp.m

image thumbnail

updated 11 months ago

sfun_joystick.zip by Per Hillerborg

S-function to use a joystick in Simulink (Windows only) (sfunction, simulink, joystick)

joystickDemo.slx

image thumbnail

updated 1 year ago

Raspberry Pi Driver Block SFunction by Joshua Hurst

Simple Digital Out SFunction example block showing how to use the WiringPi library (simulink, driver, sfunction)

Digital_Out_SFunction_Example.slx

image thumbnail

updated 1 year ago

Raspberry Pi DC Motor H-Bridge Driver Block SFunction by Joshua Hurst

DC Motor Driver Block using Soft PWM of WiringPi Library (sfunction, raspberry pi, hbridge)

DC_Motor_Driver_Block_RPi.slx

image thumbnail

updated 1 year ago

Raspberry Pi PWM Driver Block SFunction by Joshua Hurst

Simple Soft PWM driver block example using WirngPi (sfunction, driver, raspberry pi)

PWM_Out_SFunction_Example.slx

image thumbnail

updated 1 year ago

Raspberry Pi MPU6050 SFunction with I2C Communication using WiringPiI2C by Joshua Hurst

Raspberry Pi SFunction to obtain MPU6050 data using the C-library WiringPiI2C. (control, mpu6050, simulink)

MPU6050_Gyro_Accel.slx

MPU6050_Gyro_Example.slx

image thumbnail

updated 1 year ago

Raspberry Pi Quadrature Encoder SFunction by Joshua Hurst

Quadrature encoder route implemented with interrupts with WiringPi (control, motor driver, encoder)

Quadrature_Encoder_RPi_SFunction.slx

image thumbnail

updated 1 year ago

What is the best way to implement my algorithm in Simulink ? by Giampiero Campa

Giampiero Campa (view profile)

Eight ways to implement an Extended Kalman Filter as a Simulink block (extended kalman filte..., simulink, sfunction)

sfall2(block)

sysall

lt_ekfdef.m

image thumbnail

updated almost 3 years ago

Send Video from Simulink diretly to MATLAB GUI - Example. by Roni Peer

Roni Peer (view profile)

This simple example shows how you can take a Simulink signal (Video feed), and disply it in a GUI. (matlab, simulink, gui)

sfuntmpl_imaq(block)

simpleGUI_imaq(varargin)

START_HERE.m

image thumbnail

updated 4 years ago

Zero Order Hold with variable time step by Phil Goddard

Phil Goddard (view profile)

Level-2 M-file S-function that acts as a ZOH sampler with sample times specified as a block input. (simulink, sfunction)

VariableTimeSfun(block)

VariableTimeSFunModel.mdl

image thumbnail

updated 4 years ago

Detect change to function-call S-Function by David Manegold

Detect change in a signal and output a function call that can drive downstream dependant blocks (sfunction, detect change, functioncall subsyste...)

Model_detect2funcall.mdl

image thumbnail

updated almost 5 years ago

ss2sf - Subsystem-to-S Function by Cole Stephens

Cole Stephens (view profile)

Convert a subsystem to an s-function via the MATLAB command line. (simulink, sfunction, s function)

ss2sf(mdl,subsystemNames)

image thumbnail

updated almost 5 years ago

Solution of Differential Equations with MATLAB & Simulink: Lorenz Attractor Case Study by Simulink Dude

Simulink Dude (view profile)

Simulink design pattern for solving differential equations, visualize results in MATLAB graphics (differential, equation, lorenz)

lorenz_graphs(block)

lorenz_graphs_level_1(t,x,u,flag, x_initial)

lorenz_attractor_level_1.mdl

image thumbnail

updated 5 years ago

tanques interconectados con temperatura by John Caipa Roldan

s-function del modelo no lineal y linealizaciĆ³n (control, no lineal, sfunction)

csfuncTanques(t,x,u,flag,Xi)

linealizacionTanquesTemperatura(Q,V)

ModeloLinealTanquesTemperatura.mdl

image thumbnail

updated 5 years ago

tanque de calentamiento con agitaciĆ³n continua (heating tank with continuous agitation) by John Caipa Roldan

Modelo no lineal en s-function del proceso y linealizacion (control, sfunction, no lineal)

LinealizacionTanquesMezcla(w,f,Ti)

csfuncTanqueMezcla(t,x,u,flag,Xi)

pid.mdl

image thumbnail

updated 6 years ago

TWO LINK MANIPULATOR by John Caipa Roldan

nonlinear model constructed for use with the s-function block, in addition to file linearization (control, jacobian, solve)

csfuncTWOLINKMAN(t,x,u,flag,Xi)

LinealizacionSistemaTWOLINKMANIPULATOR.m

ModeloNoLinealTWOLINKMAN.mdl

image thumbnail

updated 6 years ago

Pulse with jitter by Phil Goddard

Phil Goddard (view profile)

Level-2 m-code S-Function that acts as a pulse generator with jitter around a nominal period. (simulink, sfunction, pulse)

jitterPulseSfun(block)

jitterPulseModel.mdl

image thumbnail

updated almost 7 years ago

Hystersis Block by Umesh

Umesh (view profile)

Simulink block to generate Hysteresis loop (hysteresis, sfunction)

SF_Hystersis.mdl

image thumbnail

updated almost 7 years ago

S-function to read Buffer by Umesh

Umesh (view profile)

The S-function blocks read a buffer of values and outputs the maxima and minima value in the buffer (buffer, sfunction)

minMaxBuffer.mdl

image thumbnail

updated almost 7 years ago

DIFFERENTIAL EQ. SOLUTION THROUGH S-FUNCTION by Qadeer Ahmed

Qadeer Ahmed (view profile)

Solution of differential equation through S-Function (differential equation, sfunction, differential equation...)

example(t,x,u,flag)

sim_example.mdl

image thumbnail

updated 7 years ago

gui_simulink_scope by Nassim Khaled

Nassim Khaled (view profile)

This file contains a guide_simulink_sfunction interface. It is a fairly easy and simple application. (simulink, gui, scope)

sfun(t,x,u,flag)

simulink_gui_interface(varargin)

simulink_model.mdl

image thumbnail

updated almost 8 years ago

Solving Index-1 DAEs in Simulink using Level-2 M S-functions by Atul Bhargav

This example illustrates the use of Simulink Level-2 S-functions to solve Index-I DAEs (mechanical modeling, simulink, level2)

HB1_DAE_sfun(block)

f(t,y)

HB1_DAE_plot.m

image thumbnail

updated 8 years ago

File I/O C S-function Example by Jarrod Rivituso

A simple C S-function which reads data from a file during simulation. (data import, data export, c)

filetest.mdl

image thumbnail

updated 9 years ago

Visual Studio.Net Custom App Wizard for Simulink S-Functions by Keith Rothman

Customized App Wizard for creating MEX S-Functions files in Visual Studio.Net for Simulink (external interface, mex, visual studio)

image thumbnail

updated 11 years ago

Simulating ODEs with S-Functions, step by step by Jos van Schijndel

This application shows how models based on a system of ODEs are simulated. (simulink, ode, sfunction)

simcondvfun(t,x)

simconsfun1(t,x,u,flag)

simconsfun2(t,x,u,flag)

image thumbnail

updated 12 years ago

Graphical switching between S-functions by Stacey Gage

Stacey Gage (view profile)

Use a single Simulink s-function block to access multiple s-functions. (simulink, sfunction, utilities)

ex_sfun_popup.mdl

Contact us