Answered
How can I tell Simulink to use the time steps of the input to produce exactly the same number of output steps as input?
In the "Data Import/Export" panel, Additional parameters, look for "Output options", select "Produce specified output only" and ...

8 years ago | 0

| accepted

Answered
How to incrementally save output data from long Simulink simulation?
You can specify the start and stop time of the simulation. The key point is to save the final state of the last simulation and u...

8 years ago | 0

| accepted

Answered
How to change table dimensions by ordering by column values?
Assume you put in those 15 numbers into a column vector: a=(1:15)'; b=reshape(a,5,3); t=array2table(b'); t.Propert...

8 years ago | 1

| accepted

Answered
create a matlab script file so that it loads a new configuration file and replace hte existing one in a simulink model
Save the configuration set from the sldemo_counters model to my_config_set.m. % Open the sldemo_counters model sldemo_co...

8 years ago | 0

Answered
Set step time in Simulink
The setting of this parameter is dependent. It won't take effect until other settings are in place. You can check the solver typ...

8 years ago | 1

| accepted

Answered
How to attach the element into correct index
A=[A,B(3)] A(1,:)=B(1,:)

8 years ago | 0

Answered
How to split a matrix
A=reshape(1:24,12,[]); B1=A(1:4,:) B2=A(5:8,:) B3=A(9:12,:) C=mat2cell(A,[4,4,4],2); C{1} C{:}

8 years ago | 0

Answered
break out of if statement to else
No such capability in MATLAB. I am sure you can adjust your code flow to achieve your goal without jumping around the code, whic...

8 years ago | 0

Answered
How to remove double quotes from a field?
The double quotes indicate the data is cell array of "string" class, not cell array of "char" class. They are not part of the da...

8 years ago | 0

Answered
Tracing signals in script
To find out the source block that is connected to the Inport block in F14 f14; InportBlock='f14/Controller/alpha (rad)';...

8 years ago | 0

Answered
How to find the first element in a vector of differing consecutive values?
Something like this? a=[636 637 638 24639 24640 48640 48641 48642 48643]; b=[0 a]; c=diff(b); index=c>1; out=a(...

8 years ago | 3

| accepted

Answered
How to copy a selected input-output pair of a MIMO bode plot into a new figure?
In the figure window, click menu "Edit" -> "Figure Properties ..." to activate the edit mode. Do the same for a new blank figur...

8 years ago | 0

Answered
exponential transfer function in matlab
<https://www.mathworks.com/help/control/ug/time-delays-in-linear-systems.html Time Delays in Linear Systems>

8 years ago | 0

| accepted

Answered
How can i circle shift certain elements of two arrays simultaneously?
circshift(M,4) and circshift(N,4) where 4 is the same.

8 years ago | 0

Answered
Error indexing usig logicals
This is really a floating point data precision issue. Run this to find out and deal with it based on whatever your use case. ...

8 years ago | 0

Answered
How to arrange a Matrix in different shape?
A=magic(3); B=A(:,[3 2 1]) or B=A(:,[end:-1:1])

8 years ago | 0

Answered
To find mean value of Y axis qty for specific time period?
t=0:0.1:10; y=sin(t); Index= (t>5) & (t<7); out=mean(y(Index))

8 years ago | 0

| accepted

Answered
Programmatically select a specific object when switching on plotedit
f=figure(1); p=plot(1:10); ax=findobj(f,'type','axes');

8 years ago | 0

Answered
How can I calculate the delta T continously during simulation with simulink
It sounds like Tx is the integration of delta Temperature. Use an "Integrator" block. You may need to set up a linear Gain after...

8 years ago | 0

Answered
How can I export all the enumerated data types from Data Dictionary to an m-file?
Even in R2018a, "The dictionary does not export enumerated data types (which are stored as Simulink.data.dictionary.EnumTypeDef...

8 years ago | 0

Answered
Replace NaN with mean of previous values
Use the second code, replace size() with numel()

8 years ago | 0

Answered
Syntax error in every function I wrote at Simulink Fcn block
I tried it. Initially, it had "syntax error". But once I assigned the following variables, the error disappeared. I used a Const...

8 years ago | 0

| accepted

Answered
looping over structure fields
for k=1:2:numel(fn) tmp = Structure.Aww.(fn{k}) tmp2= Structure.Aww.(fn{k+1}) end

8 years ago | 0

| accepted

Answered
is it possible to read special column of a text file?
just read the whole data and then you can do what ever you want a=importdata('FAR.txt',' ', 9); % the first 9 rows are igno...

8 years ago | 0

Answered
how do i use different parts of a variable for the same code?
m0=[1 2 3 4; 10 20 30 40]; for iter=1:2 m0(iter,1) m0(iter,2) end

8 years ago | 0

Answered
How to read header (text data of 100000 rows,18 columns) from data in excel into Matlab using different directory
Not sure what do you mean by "using different directory", but did you try? [Num, Txt, Raw]=xlsread('C:\MyDirectory\MyExcel....

8 years ago | 0

| accepted

Answered
How to stop a plot when values get to negative.
one way to do it, not sure if it is right for your use case though, z(z<0.5)=nan; surf(x,y,z)

8 years ago | 0

Answered
Is it possible to add Area annotation programmatically?
An "Area" is an "Annotation", with empty "Name", "DropShadow" set as "On".

8 years ago | 0

| accepted

Answered
How to open a .txt file with header information
importdata(FILENAME, DELIM, NHEADERLINES) loads data from ASCII file FILENAME, reading numeric data starting from line NHEADERLI...

8 years ago | 0

Answered
Programmatically changing the parameters of a LTI System Block in Simulink
The parameter names are "sys" and "IC". get_param('ES_Optimizer/LTI System','sys') get_param('ES_Optimizer/LTI System','...

8 years ago | 0

| accepted

Load more