Answered
How to get selector block configured as seen below?
start from default, set "Inpurt port size" to be 2, set "Index" to be 2

29 days ago | 0

Answered
Converting string to a double
Are you sure? >> format long >> a=str2double('1.7356922617E-3') a = 0.001735692261700

29 days ago | 1

Answered
Eliminating the rows from a matrix
index=A(:,end)<4; A(index,:)=[]

29 days ago | 0

| accepted

Answered
Save disp to a text file
help diary

29 days ago | 0

Answered
Dimensions being inconsistent even though nothing has changed the output
Double click the Outport block "Height" to check its properties. The question mark is referencing an issue there.

1 month ago | 0

Answered
Simulink does not start
try to run "slLibraryBrowser". It seems there are problems with the Simulink template files.

1 month ago | 0

Answered
if expression it is not triggered
Give some tolerance. They are not exactly the same in the world of floating-point data. >> 1-1/3==2/3 ans = logical ...

1 month ago | 1

Answered
SIMULINK: Import Variables from Workspace
The "From Workspace" data in Simulink needs to have a time. If you set the two "From Workspace" block data like this, you will b...

1 month ago | 0

Answered
Why i am getting "Set solver type of referenced model 'Drivetrain' to Fixed-step." error? How can i fix it?
The easiest solution is to click the "Fix" buttons and hope they all can be resolved. The reasons were briefly given in the mess...

1 month ago | 0

Answered
How to change the button names depending on different situations?
a=uicontrol; a.String='load' a.String='plot'

1 month ago | 0

| accepted

Answered
How to change property of multiple gain block?
Use block handles to change multiple blocks in one shot, assuming the values are the same. Turn on 'FindAll' to return block han...

1 month ago | 0

Answered
The block value shortcut does not show up in SÄ°mulink
Simulink Preference, Editor, Enable smart editing features

1 month ago | 1

| accepted

Answered
Matlab 2017a does not support Microsoft Visual 2010++ Professional compiler?
Unfortunately, you are out of luck. Look at this document, VC++ 2010 is not supported by R2017a. https://www.mathworks.com/cont...

1 month ago | 0

| accepted

Answered
How to pass a data dictionary parameters as an argument in a model reference?
I don't think there is a direct way to do this currently in R2020a. I suggest you try a workaround. Specify an argument, which ...

1 month ago | 0

Answered
When i covert a structure to cell array, my fieldNames disappear
There is no meta data text info for cell array. Use struct2table() to convert structure to table.

1 month ago | 0

Answered
Setting the end time in Simulink through an m-file; Online help seems to be wrong and unhelpful
Open the model, run the first line and check the model, you will see the 'StopTime' is changed. The problem is with the second ...

1 month ago | 1

Answered
Import Matlab matrix to Simulink
See this link and open the "Read 2-D Signal" example https://www.mathworks.com/help/releases/R2020b/simulink/slref/fromworkspac...

1 month ago | 1

| accepted

Answered
How can I determine if a value is in the interval?
if and(value>array(1), value<array(end)) display('inside'); else display('outside') end

1 month ago | 2

Answered
How do I get index matrix for matrix of values?
>> [Row,Column]=ind2sub([3,3],1:9) Row = 1 2 3 1 2 3 1 2 3 Column = 1 1 1 ...

2 months ago | 1

Answered
How to delete empty files/spreadsheets in a directory ?
run [STATUS,SHEETS] = xlsfinfo(FILENAME). Most likely, it will tell you there is only one sheet run [NUM,TXT,RAW]=xlsread(FILEN...

2 months ago | 0

Answered
How to use external simulation time in simulink?
USE "XY Graph" block. X is the received time, Y is the received data.

2 months ago | 0

Answered
how to sum vector with simulink sum block
Just use the good old Sum block. Give one Constant block, specify value as [1 2 3] and another Constant block [10 20 33], Sum to...

2 months ago | 0

| accepted

Answered
Access programmatically to EnumTypeDefinition in Simulink Data Dictionary
out=getValue(enumerationType) info=out.Enumerals info.Name

2 months ago | 0

| accepted

Answered
Is there a command to close all the tabs?
Starting from gcs, you can do this. The tab for the root level model would be kept open. The tabs for other models are also not ...

2 months ago | 0

| accepted

Answered
Sum subarrays of a Matrix.
One-liner transpose(reshape(sum(reshape(A',3,[])),3,[])) Or transpose(cell2mat(cellfun(@sum,mat2cell(A',[3,3,3],3),'unif',0))...

2 months ago | 1

| accepted

Answered
Struct contents reference from a non-struct array object.
In your code, variable "filename" is a string. It does not have the structure field ".name". If your code looks like this, then...

2 months ago | 1

Answered
Simulink Clock (time) reset?
Feed Constant value 1 to an integrator, the output is the time. Wrap the state of the Integrator to 5400 and 0.

2 months ago | 0

Answered
Searching structure that has all caps field names with list that varies in case.
for iVar=1:numel(myVars) b_sp = b_struct.dArray.(upper(myVars{iVar})); end

2 months ago | 1

Answered
combine matrix in matlab
reshape([A;B],1,[])

2 months ago | 0

| accepted

Answered
Variables scope in MatLab function block
Use "Edit Data" in the MATLAB Function Editor to specify those base workspace variables as the parameters

2 months ago | 0

| accepted

Load more