Answered
Exiting infinite loop on command
Use global variable as a flag to break the loop. Global variables always retains its value belween the function calls. % --...

14 years ago | 0

Answered
What is the difference b/w "Bus Editor" and "Bus-creator" in simulink?
You are little bit confused. *Bus Creator* is the simulink block which takes many input signals and generate bus as output. ...

14 years ago | 3

| accepted

Answered
Using 'push botton' in GUIDE to open the simulink block's mask.
Suppos your block is *MyBlock* placed in *MyModel*. To open the parameter dialog box write below code in callback function o...

14 years ago | 0

Answered
Print screen of an excel worksheet using a matlab script?
As far as I know, there is no direct cammand in MATLAB to to take screenshot. You can try below piece of code for it. (C...

14 years ago | 0

| accepted

Answered
Look up table from Excel Sheet for simulink
How data is formated in your excel sheet? Generally you can read the data from excel sheet using *xlsread()* & create simulin...

14 years ago | 0

Answered
How to get output in a function to be used in another function?
*Function A* function Data = A % Your logic end *Function B* function B(InputData) % Your logic end ...

14 years ago | 0

| accepted

Answered
Why does the Simulink memory block delay the data by more than 1 iteration?
For *Unit Delay* block ---> Set the sample time of block to -1 (Inherited). For *Memory* block ---> Select the "Inherited sa...

14 years ago | 2

Answered
Programatically test-run a model before RTW build
I am not sure why your model behaving like "PAUSED" even after executing "term" command. I can not see this behaviour on my mode...

14 years ago | 1

| accepted

Answered
Simulink 'To File' Dynamic File Names
Try in this way for x=1:n % Change the file name fname = ['file' num2str(x) '.mat']; set_param('To...

14 years ago | 4

| accepted

Answered
Add new line inside text file
See >> doc dlmwrite Use dlmwrite with *-append* option. Correct format --> dlmwrite(filename, M, '-append')

14 years ago | 0

| accepted

Answered
Final constant from simulink to GUI
*get_param()* & *get_param()* are used to read and set the block properties (attributes). No block directly returns its output v...

14 years ago | 0

Answered
Create and fill an array in simulink
Try usign *Discrete/Tapped Delay* block. It outputs all the collected samples.

14 years ago | 1

| accepted

Answered
create variable from function input
It dosn't seem to be useful to create variables with the same name as input variables. But still you can do it as function ...

14 years ago | 0

Answered
Using clock as logic operator
Instead of clock, you can use *Sources/Pulse Generator* block. Set the Period & Pulse width of pulse generator according to you...

14 years ago | 2

| accepted

Answered
storing pulses from target in a 2D matrix
You can use *Sinks\To Workspace* block to store the output in a variable in base workspace in Array, Structure or Structure with...

14 years ago | 2

| accepted

Answered
simulink use date.xlsx?
There is no block to directly read or manipulate .xlsx files from simulink. For this requirement, write MATLAB code which im...

14 years ago | 1

| accepted

Answered
MATLAB Programers for hire
If you are looking for *Simulink/Stateflow/RTW/ECoder (in embedded system domain)* related services, I can work for you.

14 years ago | 0

Answered
Masking and base workspace
Initialization commands cannot access base workspace variables, it can only access the variables from *Mask workspace*. Pass...

14 years ago | 1

| accepted

Answered
RTW generates static functions randomly when using Embdedded Matlab Function block
I have not much used emf block for code generation, so i have never come across such situation. But what i can suggest is, yo...

14 years ago | 0

Answered
How to use a simulink block in m-file
There is no way of using simulink block in the m-file. What you can do is # Create the model with the simulink block. # Pas...

14 years ago | 1

| accepted

Answered
Moving Simulink Data Into the workspace
Variables from 'To Workspace' block are saved in calling-workspace. Your way of saving them to 'base-Workspace is correct. Just...

14 years ago | 1

Answered
Logging Active States/Data during Simulation
Below is the way to log the state informations- 1. Right click on stateflow chart block and select *Log chart signals*. 2....

14 years ago | 0

| accepted

Answered
Real - time parameter tuning using xPC Target and C - MEX S - Function.
To make parameters as tunable, you can pass the parameter values from base workspace. To change the values at run time - ...

14 years ago | 0

Answered
How did you learn Simulink?
*How did you learn Simulink?* 1% From Work 99% From Simulink documentation *and* Practice...Practice...Practice..... *W...

14 years ago | 2

Answered
control simulink from mfile
To start, stop, pause, and update your model from m-file you can use set_param('YourModel', 'SimulationCommand', 'cmd'); ...

14 years ago | 1

| accepted

Answered
How do I get the file date and time
FileInfo = dir('YourFileWithExtention'); TimeStamp = FileInfo.date; By the way, in which block of simulink you are using...

14 years ago | 1

| accepted

Answered
Delete Column from matrix
Try A.data((c_x+1):end)=[];

14 years ago | 0

| accepted

Answered
problem about scope.
Use *Sinks > XY Graph*. It has 2 inputs and plots input(Y) against input(X). See <http://www.mathworks.in/help/toolbox/simuli...

14 years ago | 1

| accepted

Answered
How to generate lookup table data into a custom structure?
Instead of defoning look-up table array directly in the Look-up table block itself, define them as *Simulink.Parameter* object i...

14 years ago | 0

Load more