Réponse apportée
How to pass value to local scope Data store memory block without making it global
A local data store can still cover a large portion of a model. It is like a tree. If you place the Data Store Memory block at a ...

presque 4 ans il y a | 0

Réponse apportée
How can I solve the following error?
Most likely, you have a variable called "sum". Clear it first and then run your code clear sum; A=magic(5); sum(A,2)

presque 4 ans il y a | 1

Réponse apportée
Selecting multiple array elements
n = 10; A = zeros(n); B = A; k = [1 1; 2 3; 4 5; 1 8; 8 6]; A(k(1,1),k(1,2))= 1; A(k(2,1),k(2,2))= 1; A(k(3,1),k(3,2))= 1;...

presque 4 ans il y a | 0

| A accepté

Réponse apportée
Difference between matlab ss function and Simulink State-Space block
https://www.mathworks.com/help/control/ref/lti.lsim.html There are limited number of settings when calling lsim(sys,u,t,x0,meth...

presque 4 ans il y a | 1

Réponse apportée
Programmatically get propagated datatype of a block
Something like model([], [], [], 'compile') get_param('BlockPath','CompiledDataType') model([], [], [], 'term') You can use ...

presque 4 ans il y a | 0

Réponse apportée
Create a time vector
My answer to your previous question is the answer. Just change seconds(1) to seconds(1/fs) https://www.mathworks.com/matlabcent...

environ 4 ans il y a | 0

Réponse apportée
Create Structure from cell array with dot separation in string
If your question comes down to whether "em1500.eta_t.x" can be made a field name, then the anser is No. It is an invalid field n...

environ 4 ans il y a | 0

Réponse apportée
Create a time array
val=['17-10-58_086' '17-11-09_923'] StartEnd=datetime(val,'InputFormat','HH-mm-ss_SSS') TimeVector=StartEnd(1):seconds(1)...

environ 4 ans il y a | 0

Réponse apportée
Simulink model not plotting my Sine
I understand this might be just an exercise to learn Legacy Code Toolbox and S-function, but there are a couple of things wrong ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Why Unrecognized function or variable 'set_point'?
The variable that you are looking for, "set_point",is in "out.set_point". So, in your code, replace "set_point" with "out.set_p...

environ 4 ans il y a | 1

Réponse apportée
How to press any key to continue after running a command prompt
This is an old technique. Run command as TDF2CSV.exe file2convert.TDF << Dummy.txt where Dummy.txt is a text file which contai...

environ 4 ans il y a | 0

Réponse apportée
why I'm getting error in MATLAB function block coding showing that parse error?
Change the last line [d1 d2] = [Po P1ref] to d1 = Po; d2 = P1ref; or [d1 d2] =deal(Po, P1ref)

environ 4 ans il y a | 0

Réponse apportée
How to find a user based on full name and eight digit number
On this page, click "More" and then "Contributors" On that page, the serch box is for "Search Contributors". Type in "per isak...

environ 4 ans il y a | 0

Réponse apportée
Reset Repeating Sequence Block
If you look inside the mask of the "Repeating Sequence" block, you will see it is built on top of the 1-D lookup table. To achi...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
"brake" not working in Matlab 2021b - is there a fix or work around?
"break", not "brake"

environ 4 ans il y a | 0

Réponse apportée
Href hyperlink, how to escape double quotes " ?
knowing double('"') char(34) This leads to the following, which works out properly disp('<a href="matlab:system([''explorer....

environ 4 ans il y a | 1

| A accepté

Réponse apportée
how to extract n elements from a vector and store them in a matrix
a = [3 6 0 3 8 4 9 1 2 4 9 3 2 5 7 0 1 2]; b = [5 6 5 3 1 3 8 2 2 3 5 7 1 2 6 1 6 7]; c = [0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0...

environ 4 ans il y a | 3

Réponse apportée
convert char array to string
char(fileparts(...))?

environ 4 ans il y a | 0

Réponse apportée
which is the right syntax with find_system and blocktype
Using 'sm_lib/Joints/Weld Joint' for block type is incorrect. To find it out, do it manually first. Select the block, run get_pa...

environ 4 ans il y a | 0

Réponse apportée
Merge bits on a byte simulink
Drop 8 Constant blocks, each is specified as "true" or "false". Use a "Vector Concatenate" block to make it 8x1 vector, then fee...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How can I get the full path of my current *.mlapp file?
I think you can implement this in your code. Search for the .exe file or .mlapp file using exist('', 'file'), use which() and f...

environ 4 ans il y a | 0

Réponse apportée
imoiHow do i input a matrix from mfile to simulink?
From Workspace block There are examples in the link.

environ 4 ans il y a | 0

Réponse apportée
How to set global variables for simulink with matlab functions
The link is document for R2022a. You have R2017a. Open your MATLAB Function block Editor, click the "Edit Data" button.

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How can i assure the same ode45 solver settings for Matlab and Simulink?
Choose whatever the proper settings for solver in Simulink, run simulation and save the simulation time data (through model conf...

environ 4 ans il y a | 0

Réponse apportée
How to pass mask parameters in a child Matlab function ?
For those yellow blocks or any of the typical Simulink blocks, there is a block parameter dialog, where you can specify a variab...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
"Cannot find state N in the given variable." Error when trying to start a simulation using previously saved states.
set_param(model, 'LoadInitialState', 'on') just turns on that checkmark, you need to provide the variable for the initial state....

environ 4 ans il y a | 0

Réponse apportée
How do you sum a signal in Simulink?
https://www.mathworks.com/matlabcentral/answers/1736595-cumulative-sum-in-simulink

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Cumulative sum in Simulink
For continuous system, feed your signal to an Integrator block. For discrete system, add your signal with the output of a Unit ...

environ 4 ans il y a | 0

Réponse apportée
How to create a running window inside simulink model in MATLAB/Simulink that can take some sample of input data at every 0.05 sec time instance & feed to the MATLAB program ?
This is the fundermental basic of the Simulink simulation. If nothing is constrained, set the solver to be discete, with fixed ...

environ 4 ans il y a | 0

Charger plus