Réponse apportée
find indicies of maximum and minmum elements of an array in its each segmented smaller arrays, plus mean
Here is one way to find the max index without for-loop. Not sure if it is faster for larger data %% A=1:100; indexA=[8 16 ...

presque 6 ans il y a | 0

Réponse apportée
find minumum indices of one array in another array
You have the assumption that A is incremental. If it is always true, it can be done like this. %% A= [ 47 100 153 207 ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
to workspace block logging in real time?
In that case, you need this toolbox Simulink Desktop Real-Time. It can slows down your simulation to try to match real time.

presque 6 ans il y a | 0

Réponse apportée
Assigning Dynamic Variables in Simulink
Put the code in Model Properties, Callbacks, InitFcn. It will be executed every time the simulation is run. MyData=input() MyD...

presque 6 ans il y a | 0

Réponse apportée
Limit a vector value
>> min([1 2 3],[2 0 5]) ans = 1 0 3 also see max()

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Incorrect use of '='
use "==" for equal compare. It is in the error message.

presque 6 ans il y a | 0

| A accepté

Réponse apportée
EVALIN cannot execute a return?
It seems that "return" was not executed in the "caller" workspace as it is supposed to by evalin(). But would a "regular" appro...

presque 6 ans il y a | 0

Réponse apportée
How to repeat different vectors to form another vector?
repmat()

presque 6 ans il y a | 0

| A accepté

Réponse apportée
I cannot use the Fixed-point Tool when using dual-port RAMs in my design - strange bug
Internal "Idx1" traces back to input port "rd_addr". The error is complaining that the "rd_addr" can't be negative. In your mode...

presque 6 ans il y a | 0

Réponse apportée
Changing the number of bits for a value
help fixdt

presque 6 ans il y a | 1

Réponse apportée
Indexing n-th element with increasing offset.
%% a=1:13; b=cumsum(a); X=zeros(1,100); X(b)=1

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How do I offset a vector plot?
V = 5:2:17; index=5:9; figure plot(index,V(index))

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Include of custom code in generated
Use this block? Model Header Block Model Source Block

presque 6 ans il y a | 0

Réponse apportée
Delete a block and close an unconnected line with Ground & Terminator
delete_block() delete_line() addterms()

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Importing workspace variable to simulink?
Use "From Workspace" block. Assume your data is MyData=1:10, you need to make it a column vector and also provide a column vecto...

presque 6 ans il y a | 0

Réponse apportée
How to solve the discontinuity of MPC controller output?
Use a rate transition block or zero-order holder block to deal with different sample rate

presque 6 ans il y a | 0

Réponse apportée
Retrieving the first time an enabled subsystem is triggered in Simulink
Within your "Parachute drag" enabled subsystem, feeding a constant of 1 to an Integrator block will give you the time since the ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Search by line name
set 'FindAll' to be 'On' to search for signal lines. For outports, you need to clarify whether it is Outport block or outports o...

presque 6 ans il y a | 0

Réponse apportée
Combining function handles into one function handle
>> a = @(x) x(1)^2+x(2)^2; b = @(x) x(3)^2-x(4)^2; >> a(1:4) ans = 5 >> b(1:4) ans = -7 >> c = @(x) [x(1)^2+x(2...

presque 6 ans il y a | 0

Réponse apportée
Simulink: Need to update variables used in simulink differential equation solver
Do you have the formula of the function? For example, if pe1(t)=sin(t), you just use the "Fcn" block, specify it as "sin(u)" and...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How to use double precision functions in a single precision code generated project?
It is not a matter of double or single. The supported data types for this block is "Supported data types: Fixed-point, integer (...

presque 6 ans il y a | 0

Réponse apportée
How to combine cells from cell array with a loop
data{1}=magic(3); data{2}=rand(2,3); data{3}=ones(4,3); cell2mat(data.')

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How to create a 5D matrix by repeating a 2D array?
A has 70*70 elements. The loop runs only 70 times. Anyway, look into repmat(), reshape(),repelem().

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Restoring model operating point and resetting time
Utilize the "Initial State" and "States" in Configuration Parameters, Data Import/Export. Basically, log the "States" of one sim...

presque 6 ans il y a | 0

Réponse apportée
How to create a structure of time series at one time
It can be done but it would be tedious. I would suggest one of these Use "State Reader" and "State Writer" block in Simulink Si...

presque 6 ans il y a | 0

Réponse apportée
Simulink: Need help using simulation time as a variable in Simulink Calculations
Use the Clock block from Simulink Sources.

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How to take a max of a value in a struct
One way to do this PropertyNames={'Name','Weight','Strength'}; Data={'Metal',100,100; 'Plastic',50,50; 'Paper',1...

presque 6 ans il y a | 0

Réponse apportée
Variable names in array2table when creating table, "duplicate variable names" error
No way to know what is in "master". But there is a duplicated name in 'parameters'. The name 'TimeofSootSpikeEnd_sec' appeared t...

presque 6 ans il y a | 0

Charger plus