Answered
Accessing an externally defined array's elements in the generated code
Create a poiter to you data in your code. uint16 *myArrayPtr = &array[1]; Now in your model, for the signal which read t...

13 years ago | 0

Answered
can't change startup directory when calling matlab with -automation from command line
Try set CHANGE_DIR_CMD=cd('%CD%') matlab -automation -r "%CHANGE_DIR_CMD%;myScript"

13 years ago | 0

Answered
adding quotes to string
a='name'; a = ['"' a '"'];

13 years ago | 1

| accepted

Answered
A problem about battery parameters in simulink
Batt is a structure which is created in Mask initialization. Its value is returned from function BatteryParam. This function is ...

13 years ago | 1

Answered
How to retrieve a subblock name at initalization.
Hope the parameter with same name as block name is present in the base workspace whose value will be assigned to mask variable *...

13 years ago | 0

| accepted

Answered
How to get current time of simulation while Model is executing.
See <http://www.mathworks.in/help/simulink/ug/accessing-block-data-during-simulation.html Access Block Data During Simulation...

13 years ago | 4

| accepted

Answered
using a matlab string as a valid variable name???
X = 'omega'; eval([X '= [2 3 4 5]']); This will create a variable with name *omega*. But, _eval()_ function is not re...

13 years ago | 3

Answered
condition check from matfile
Use, save('Filename.mat','value','text')

13 years ago | 0

| accepted

Answered
Exchange Data between functions
Use gui handle object to to store the data. This handle will be common in all callback functions function OpenMenuItem_Call...

13 years ago | 0

| accepted

Answered
Folder for Simulink S-Functions
S-function do not accept file path as s-function name. You can do in this way # Put your m files in different folders as you...

13 years ago | 1

Answered
how do I convert all capital letters in a string to lowercase and add a space before them?
Mystr = 'ABCDEF'; MystrLower = lower(Mystr); MystrLowerWithSpace = [' ' MystrLower]; %---------OR---------- % ...

13 years ago | 1

| accepted

Answered
I want to make my program interactive
<http://www.mathworks.in/help/matlab/ref/uigetfile.html uigetfile> <http://www.mathworks.in/help/matlab/ref/uiputfile.html ui...

13 years ago | 0

Answered
Is it possible to use structure variable as an input parameter for Matlab function block in simulink?
You can create a non-virtual bus signal in simulink and pass this to Matlab function block. Inside matlab function block, bus an...

13 years ago | 3

| accepted

Answered
How do I create a Stand Alone Application using Windows for a GUI that starts a Stateflow model?
Stateflow can not be opened standalone without Matlab. Stateflow runs under simulink environment and simulink runs under matlab ...

13 years ago | 0

| accepted

Answered
How to convert aTapped Delay block for TargetLink?
You can implement same behavior as *Taped Delay block* using number of *Unit delay blocks in series. See the snap here <<h...

13 years ago | 0

Answered
How to call a event(Simulink model) in MATLAB Script ?
Read the docs refered in links: <http://www.mathworks.in/help/simulink/ug/accessing-block-data-during-simulation.html Access...

13 years ago | 0

Answered
how to pass variables from simulink to workspace,when simulink has been paused from MATLAB Script
@Arun, I hope that you don't have any strange varsion of matlab (like *Matlab R. Strange*). _sim()_ command will not return t...

13 years ago | 0

Answered
Which simulink block will take feedthrough value as input
There are many such blocks, for example *<http://www.mathworks.in/help/simulink/slref/unitdelay.html Unit Delay>* block which ha...

13 years ago | 0

Answered
Mask Initialization Commands in Generated Code
You can generate comments in the code specific for each block using *Block's Description* field. # Write click on block -> Op...

13 years ago | 0

Answered
Values from For Loop Iteration to save on an extra m.File
Buff = zeros(numel(850:10:870),2); Ctr = 1; for PC=850:10:870 EG=1286 Main Buff(Ctr, 1)...

13 years ago | 0

| accepted

Answered
Determination of a driving style as input when Adaptive cruise control system is turned to on?
In your state machine create a local data of same type as *driving_style_value* input. In your code if CAR_IN_ACC_MODE ...

13 years ago | 0

Answered
Simulink: Bus to Vector
Separate the vector elements using *<http://www.mathworks.in/help/simulink/slref/demux.html Demux>* block and combine them again...

13 years ago | 0

| accepted

Answered
Display multiple causes of an error settings
I am also using same version and I *can see* all the missing parameters at one time. And I don't think that there is any special...

13 years ago | 0

Answered
changing the simulation time in simulink through script
I am not sure how you are managing to change the simulation time during simulation. *But for your parameter value problem :* ...

13 years ago | 0

| accepted

Answered
Displaing values at block annotation
I think, it is not possible to display value directly in annotation (lets see if anyone knows). But you can mask the block an...

13 years ago | 0

Answered
How can i store all simulation results from ?
% Create matrix to store result MySavedResult = zeros(500,5); % Store like this for x=1:500 res = SomeProcess...

13 years ago | 0

Answered
how can i give m-file output to simulink model as input
# Save your m-file output to base workspace in a variable say *MayVar*. # Put a constant block in simulink model and put value ...

13 years ago | 0

Answered
How does one track a change in global variable values and error out?
% ========== You Main function=========== function YourMainFunct() global x; x = 10; % Just Initialization ...

13 years ago | 0

| accepted

Answered
C-Mex S function - storing values between timesteps?
You can create the discrete states in your s-function and save the input values in state variables in _<http://www.mathworks.de/...

13 years ago | 0

| accepted

Answered
How to Converting sine wave to a square wave in stateflow without invoking simulink function?
Even though it is not clear what you want to do, I have attached image to describe how you can work with *Simulink function*. ...

13 years ago | 0

| accepted

Load more