Answered
Using assignin command in guide
switch val case 1 evalin('base',['C(' num2str(a) ',:)=''abc''']); case 2 evalin('base',['C...

13 years ago | 0

| accepted

Answered
How to read a series of files?
for x=1:n % Open the file fh = fopen(['filename(' num2str(x) ')'],'r'); % Read the file % Close the fi...

13 years ago | 1

Answered
Error evaluating parameter 'Value' in simulink
Ok, I think I got the problem. By default the *source workspace* for simulink model is *base workspace*. So when you simulate...

13 years ago | 2

| accepted

Answered
How do you compile a dll using the legacy code tool?
Legacy code tool is not for compiling s-function to dll. It is used to generate & build s-functions which wraps the existing c/...

13 years ago | 1

Answered
"Connect to Target" command from Matlab to Simulink
set_param(gcs,'SimulationCommand','connect'); Read from <http://www.mathworks.com/matlabcentral/newsreader/view_thread/2528...

13 years ago | 2

| accepted

Answered
Is it possible to make input or output ports in Simulink to automatically take the name of the signal?
There is a _ConnectionCallback_ function which can be implemented for the port of the blocks. This callback is triggered every t...

13 years ago | 0

| accepted

Answered
How to limit the Pulse generator Pulses ?
You can implement with algorithm as shown below <<http://oi48.tinypic.com/2s0b712.jpg>> *Sources/Clock* block gives the *c...

13 years ago | 0

| accepted

Answered
embedded matlab function block sample time
# Right click on your embedded matlab function block and go to *Subsystem Parameters...*. # Select the check-box *Treat as atom...

13 years ago | 4

Answered
simulink_and gui and figure
You can use event listener to make communication between your GUI and simulink. See <http://www.mathworks.com/help/toolbo...

13 years ago | 2

| accepted

Answered
simulink and gui communication in real time
Assuming your *_gui model_* is nothing but a *matlab GUI*. To access the simulink's simulation data at run time (when the sim...

13 years ago | 1

Answered
unique Simulink model identifiers
When a model is create, there can be 2 unique identifier for the model: # *Model name*: This is created every time when a new...

13 years ago | 0

| accepted

Answered
How to use xpc target?
xPC targets are generally used for Hardware-In-Loop (HIL) testing of Simulink/Stateflow models. Using xPC Target, you can con...

13 years ago | 0

| accepted

Answered
simulink and gui across workspace
Simulink data from *To Workspace* block is always saved in *Matlab base workspace*. So your variable "sout" will appear in matla...

13 years ago | 2

| accepted

Answered
Problem with calling upon a Simulink model from a GUI
In your question you have mentioned: _I do not have the problem when I have the window of invcleanx.mdl open in Simulink, so ...

13 years ago | 2

| accepted

Answered
Help with saving to matlab
Try fname= sprintf('%s',... 'C:\Documents and Settings\zceeg80\My Documents\MATLAB\simplifyCode\result.dat') See ...

13 years ago | 0

| accepted

Answered
Renaming a model from explorer or MATLAB folder
AFAIK, it is not possible to handle the *model file rename* event or callback *in the matlab* when file is renamed from or outsi...

13 years ago | 0

Answered
[DISCONTINUED] Wish-list for MATLAB Answer sections.
*Answers* list in *My Answers* is sorted by *old-to-new*. It takes long time to go through the all answers and reach the latest...

13 years ago | 1

Answered
Simulink Conditional Execution with From Workspace Block
If you are using some block in the model and you are resolving the value in the block form the work-space, then variable *must* ...

13 years ago | 2

Answered
help regarding starting simulink
Documentation provided by mathwork are best start-up point to learn simulink. You can start learning with <http://www.mathworks...

13 years ago | 1

Solved


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

13 years ago

Solved


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

13 years ago

Solved


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

13 years ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

13 years ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

13 years ago

Answered
A new block named 'modelName/blockName' cannot be added.
It could be due to the reason, you are trying to add a block with the name which already exists in the destination path. To ...

13 years ago | 4

| accepted

Answered
PreSaveFcn Callback
Store the current model name in a variable and then save it with other name. OldName = bdroot; % ie model_A save_system(...

13 years ago | 1

| accepted

Solved


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

13 years ago

Solved


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

13 years ago

Solved


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

13 years ago

Solved


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

13 years ago

Load more