image thumbnail

updated 26 days 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

image thumbnail

updated 26 days 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

image thumbnail

updated 26 days 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

image thumbnail

updated 26 days 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

MPU6050_Gyro_Example

image thumbnail

updated 27 days 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

image thumbnail

updated 2 months ago

sfun_joystick.zip by Per Hillerborg

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

joystickDemo

image thumbnail

updated 4 months ago

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

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 10 months ago

Calling Shared Libraries from Simulink by Mikhail

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

Calling Shared Libraries from Simulink

simlib_test

simlib_test_dyn

image thumbnail

updated 2 years ago

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

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 3 years ago

Zero Order Hold with variable time step by Phil Goddard

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

image thumbnail

updated 3 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

image thumbnail

updated almost 4 years ago

ss2sf - Subsystem-to-S Function by Cole Stephens

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

ss2sf(mdl,subsystemNames)

image thumbnail

updated almost 4 years ago

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

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

image thumbnail

updated almost 5 years ago

tanques interconectados con temperatura by John Caipa Roldan

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

[A,B,C,D,Xi,Qi,Vi,x1,x2,x3]=linealizacionTanquesTemperatu...

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

ModeloLinealTanquesTemperatura

image thumbnail

updated almost 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)

[A,B,C,D,Xi,x1,x2]=LinealizacionTanquesMezcla(w,f,Ti)

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

SimLineal

image thumbnail

updated 5 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

image thumbnail

updated 5 years ago

Pulse with jitter by Phil Goddard

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

jitterPulseSfun(block)

jitterPulseModel

image thumbnail

updated almost 6 years ago

Hystersis Block by Umesh

Simulink block to generate Hysteresis loop (hysteresis, sfunction)

SF_Hystersis

image thumbnail

updated almost 6 years ago

S-function to read Buffer by Umesh

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

minMaxBuffer

image thumbnail

updated almost 6 years ago

DIFFERENTIAL EQ. SOLUTION THROUGH S-FUNCTION by Qadeer Ahmed

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

example(t,x,u,flag)

sim_example

image thumbnail

updated 6 years ago

gui_simulink_scope by Nassim Khaled

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_scope

image thumbnail

updated almost 7 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)

hb1dae

HB1_DAE_plot.m

image thumbnail

updated 7 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

image thumbnail

updated 8 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 10 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)

simconsfun1(t,x,u,flag)

simconsfun2(t,x,u,flag)

xdot=simcondvfun(t,x)

image thumbnail

updated 11 years ago

Graphical switching between S-functions by Stacey Gage

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

ex_sfun_popup

Contact us