Answered
how can make for-loop in an if-end command for 'and(&) ' all arrays?
Better option than using for loop if(~isempty(find(matrix(:,1)<1))) a=2; end

14 years ago | 1

Answered
Minimum value of cell array
I don't think the declaration of cell you have given above is correct. Even though if content of your cell array d have the s...

14 years ago | 3

| accepted

Answered
microcontrollers compatible with Matlab/Simulink
You can choose any micro-controller of your choice, because Simulink coder (or RTW) generated code is not platform specific. Co...

14 years ago | 0

| accepted

Answered
matlab preloaded 'load' files
I don't think any such method exist. Once loaded by 'load', matlab extracts the variables from .mat file and saves in workspace...

14 years ago | 0

Answered
saving all of workspace in a specified folder
Saving to path save('path\myfile.mat'); Example: save('D:\WORKING\Myfile.mat'); Loading from a path load('path\myfile.mat...

14 years ago | 4

| accepted

Answered
gui
In matlab, scope of a variable is limited to the function in which is declared. If u want to share the variable between multiple...

14 years ago | 0

| accepted

Answered
sort a matrix depending on first row
[mat inx]=sort(b(1,:)); SortedMat=[b(:,inx(1)),b(:,inx(2)),b(:,inx(3)),b(:,inx(4))];

14 years ago | 0

Question


Command to 'Goto' a position in simulink window.
Is there any command line function to goto a position i.e. focus at a fosition in simulink window? My model is very big. I have...

14 years ago | 1 answer | 1

1

answer

Answered
Automate SFunction generation - Simulink workflow
You can trace the change in your library file containing subsystem by its 'ModifiedDate'. Write a script to find the modified...

14 years ago | 0

Answered
Returning largest and smallest values in the array
function [L, S, Lidx, Sidx] = largest_and_smallest(array) L=array(1); S=array(1); Lidx=1; Sidx=1;...

14 years ago | 0

Answered
How to match and two matrix elements and place it under one matrix...let me explain
Sz=size(B); C=zeros(Sz(1),10) for Br=1:Sz(1) for Bc=1:5 for Ac=1:10 if(B(Br,Bc)==A(Ac))...

14 years ago | 1

Question


Initial output value of Outport in top level subsystem of a model.
Consider an unconditional top level subsystem of a model. 'Initial output' field of Outports in top level is disabled in block ...

14 years ago | 1 answer | 0

1

answer

Answered
problem with TreatasEmpty using textscan command
strrep(stormspeed{1},'N/A','NaN')

14 years ago | 0

| accepted

Answered
reading text file in matlab
These are the steps 1. Read the text line by line 2. Remove '(' & ')' from each line 3. Arrange the lines in matrix expression f...

14 years ago | 0

Answered
Get simulation time in a Simulink model
Solution mentioned above (by Jiang) is one approach, also you can set the 'trigger-type' of trigger block to 'function call' ins...

14 years ago | 0

Answered
question regarding code generation.
As your model contains only stateflow chart, you can generate a simle C-code using 'stateflow coder(Use custom target). It gener...

14 years ago | 0

Question


How to suppress unwanted lines from ert generated code
The header file of my generated code contains unused include statements as #include <stdlib.h> #include <math.h> #in...

14 years ago | 1 answer | 0

1

answer

Question


ERT code generation customization
I want to customize the code generated by ERT target, but i dont know where to start. One of my customization requirement is -- ...

14 years ago | 1 answer | 0

1

answer