simulink

How do I change Simulink xPC target serial comm speed on the fly

I have an xPC target application that talks to a device over RS-232. I am using the xPC serial block for this. To talk to this device I first have to start at a default speed, say, 9600 bps, request a change of speed to, say 57600 bps, then change the speed on my side to match it. The problem with the xPC block is that it forces you to c...

Running a Simulink xPC block at a faster rate than the continuous rate

I have a Simulink xPC target application that has blocks with discrete states at several different sample rates and some sections using continuous states. My intention on keeping the continuous states is for better numerical integration. What creates the problem: One block is reading a device at a very fast rate (500 hz). The rest of t...

What is MATLAB? Does it generate executables?

What exactly is MATLAB/Simulink? I've tried to understand it but have only gotten more confused in the process. I know that you can write programs utilizing high-level industry-specific functions and algorithms but: Is it a runtime where you can 'build' your code into an exectable program for a Client/Server? Is it only a simulation e...

Using Matlab & Simulink models in .NET

Hi, I am creating a quite complex digital filter in Simulink. For testing I generate a .txt file i .NET application and use this file as a source in Simulink model. Does anyone know whether it is possible to generate a Simulink model, define input and output and then connect it with .NET application? ...

Simulink version of AnyLogic component

Does anybody know what components in Simulink (MATLAB package) are analogs for AnyLogic components? (e.g: source, buffer, delay, sink). Or how can I easily simulate behavior of AnyLogic model in MATLAB? Maybe there are some cool magic tools? ...

Modeling and Simulation Programming Language

I work with many different models and simulations. Some of the older models and simulations are written in FORTRAN. Some of those models have been converted to C++, but the current trend is to create these models using MATLAB/SIMULINK. From a computer science perspective I have always felt MATLAB/SIMULINK was not a good solution. Wha...

Can I embed the Simulink interface in a MATLAB GUI?

I would to display the Simulink workspace in a MATLAB GUI window. This is cosmetic as I know well that Simulink operates fine without this addition. However, I have no idea how to have a space in a GUI where the Simulink workspace can be displayed. Effectively, the GUI would form a thick frame around the Simulink workspace. Please le...

How do I get data from a Simulink block into a MATLAB GUI?

I have a Simulink model that uses an embedded MATLAB function for a block, and I haven't been able to figure out how to move data between the embedded MATLAB block and a GUI in real-time (i.e. while the model is running). I tried to implement a "to workspace" block in my model but I don't know how to correctly use it. Does anyone know h...

Can you explain this Embedded MATLAB Function error?

I'm having a problem sending a value from a GUI to an Embedded MATLAB Function (EMF) in a Simulink model. I get this value from a slider in my GUI and send it to an EMF block in my model. I can confirm that the value is being transferred correctly from my GUI to my Simulink block, since I can display the value with a display block in my ...

MATLAB set_param for From Wave Device

hi guys does anybody knows hot to set the parameters of a from wave device block in a simulink model? i.e. i need to set the "samples per frame" parameter. it must be something like ('Model Name/ From Wave Device','Samples Per Frame',1024) ... but it doesnt work like this. is it even possible to set the parameters of this block??? glob...

Makefile Error in Matlab Real-Time Workshop

I'm using Real-Time Workshop to auto-generate executables for VxWorks, but I am getting an error at the following command: J:\Tornado\tests\add\add_tornado_rtw>make -f add.mk GENERATE_REPORT=0 TMW_EXTMODE_TESTING=0 RTWCAPIPARAMS=0 RTWCAPISIGNALS=0 MODELLIB=addlib.lib RELATIVE_PATH_TO_ANCHOR=.. MODELREF_TARGET_TYPE=NONE add.mk:345: **...

Reducing calculation time for derivative blocks in SimMechanics

I have a program in SimMechanics that uses 6 derivative blocks (du/dt). It takes about 24 hours to do 10 secs of simulation. Is there any way to reduce the calculation time of the Simulink derivative blocks? ...

Warning: Ignoring excess mask dialog entries in:

I'm having serious trouble debugging the following Matlab Warning: Warning: Ignoring excess mask dialog entries in: (path to block under mask of block of Simulink model I'm running) Does anybody know what it even means? What are "mask dialog entries"? ...

How to link a dll to Simulink??

I need to use a dll file in my Simulink model. Does anyone have any suggestions? ...

Matlab Simulink version control with multiple developers

We're using Matlab Simulink for model development (and Real-Time Workshop autocoding) within a team of several developers. We currently use Visual Source Safe (yes, I know its terrible) for version control, using locks to prevent conflicting changes. We'd like to migrate our programme to a different version control system (svn, hg or g...

Matlab Simulink scope log or saved data

I have a simulink model with a scope output that I want to observe. However, I want the data shown on the previous simulation while being stopped to be continuously shown on the scope window, or saved to a file somewhere. Is there any easy way to achieve this? Thanks in advance. ...

Matlab: convert function to simulink block

How do I convert from a function that I have written as an m-file into a block in Simulink model? I couldn't find anything on Google that tells me how to do that easily, so it would be much appreciated if any of the readers here can help point me in the right direction. ...

Simulink: Possible to form a Pulse Generator with amplitude between -1 and +1

Okay - I've got Simulink up and running and I'm using the Pulse Generator with a pretty simple transfer function and the scope. I would like however to use a pulse that goes from -1 to +1 instead of from 0 to +1. Is there any way to alter the Pulse Generator block so that the amplitude is between -1 and +1? Thanks. ...

ieee 802.15.4 oqpsk with half-sine pulse shaping VS msk difference?

hi is there any difference between half-sine pulse shaping oqpsk used in IEEE 802.15.4 and MSK implemented here? ...

matlab v.s. simulink in digital image processing?

Hi is there anything i can do with code in matlab for digital image processing that i can't do with simulink's digital image processing toolbox or vice versa??? what difference is there between the two ? thank you ...