Réponse apportée
How to change initial value of Simulink Integrator at each time step?
double click the Integrator block to open the dialog, turn on "reset" and "initial condition" input port and work it out.

plus de 3 ans il y a | 0

Réponse apportée
why does the command window say my file is not found
Could be a Lab1.mdl file. Try this open_system('Lab1'); sim('Lab1');

plus de 3 ans il y a | 0

Réponse apportée
How to answer a call for an input from the script?
I know if you run system('MyApp.exe') and MyApp.exe asks for your input and you key in three letters 'abc', then you can create...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Is there a way to find the area between to graphs in simulink?
In Simulink, subtract yellow signal from the blue signal and then feed it to an integrator block. That will give you the area be...

plus de 3 ans il y a | 0

Réponse apportée
Simulink: Ctrl-click does not link two blocks.
Try this Drop a Bus Selector block (it has two outputs) and a XY Graph block (it has two inputs). single click the Bus Selecto...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Relay with 3 states simulink block
I was able to achieve it by this.

plus de 3 ans il y a | 0

Réponse apportée
How can I create a solid line from the data within a for loop?
Typical way is to store the data in an array and then plot it once. T=0:0.2:100; Eff=zeros(size(T)); for k=1:length(T) i...

plus de 3 ans il y a | 0

Réponse apportée
[Simuink] How to calculate the running time of one time step ?
I remember the Profile shows the total time and how many times a block (or function) has ran. So you divide the total time by th...

plus de 3 ans il y a | 0

Réponse apportée
error while importing excel file
Run the code line by line, check the value of some variables and you will find the problem easily. [~, ~, raw] = xlsread([pathn...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Loop For extract maximum rows of matrix based on vectors
a=[1 3 4 1 5 4 1 6 4 1 2 4 1 1 4 2 4 4 2 4 4 2 4 4 2 4 4 2 5 4 1 1 4 1 1 ...

plus de 3 ans il y a | 0

Réponse apportée
Simulink Logic - Capturing a Signal Value at a Specific Point for Control
The logic of velocity >=0 will generate a step output signal. Use this signal to trig a triggered subsystem. Specify the trigger...

plus de 3 ans il y a | 0

Réponse apportée
How to rename the S-function when automatically converting the simulink model to an S-function?
Not sure what happened to you, but I tried in R2022b. The default name for the generated S-function name is "SubSystemBlockName_...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
I am importing the time series data in Simulink from workspace. But the Scope does not show the plot. An Error is coming as given below :
Open the example model in the help document, there is an exaple on how to import time series data. From Workspace

plus de 3 ans il y a | 0

Réponse apportée
Extrapolate value from set of data
I would say the typical approach is to take the average of testing outputs for the same inputs.

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to get the total number of changes in a column of numbers
a=[1 2 2 2 3 3 4 4 5 4 3 3]; b=sum(diff(a)~=0)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How can i create a function block in simulink that takes multiple input vectors as arguments?
Assume the same input, inside the MATLAB Function block, use u(1), u(2) to reference, not u[1], u[2].

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How can we insert a row matrix without altering the rest of the values?
A=magic(3); C=transpose(reshape([A,10*A]',size(A,1),[]))

plus de 3 ans il y a | 3

Réponse apportée
Simulink Code Generation: blocks with masks and tunability
Create Tunable Calibration Parameter in the Generated Code

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
repeat n times vector with name index
for i=1:n E{i}=trapz(days,D{i}); e{i}=D{i}(1,1); ee{i}=D{i}(5,1); Etotal{i}=E{i}A+570*e{i}+2330*ee{i}; end

plus de 3 ans il y a | 0

Réponse apportée
How can I run simulink one sample at a time?
sldebug step top

plus de 3 ans il y a | 0

Réponse apportée
How do I have a time based function be the input for revolute joint position in Simulink
The Clock block provides the time line that the simulation runs on. You can use that for your function.

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Specifying values in 2D array when I know the indices
A = [1 1 1 1 100; 100 1 1 1 1 1 1 100 1 1 1 1 1 100 1; 1 100 1 1 1]; [~,idx] = max(A,[],1,'linear') B = [...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Simulink.BlockDiagram.arrangeSystem does not work inside library
I've tried it. You need to disable the library link first. set_param(gcb,'LinkStatus','inactive') Simulink.BlockDiagram.arrang...

plus de 3 ans il y a | 0

Réponse apportée
Combining rows of each field within a structure
s(1).f=1:3; s(2).f=4:6; s(3).f=7:9 vertcat(s.f)

plus de 3 ans il y a | 0

Réponse apportée
how to export varied variable to saturation block in Simulink?
Use Saturation Dynamic

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
unable to programmatically find lines inside a custom library-block
You forgot 'FollowLinks','On' >> oldLines = find_system(gcb, 'FindAll', 'on', 'LookUnderMasks','all', 'type', 'line') oldLines...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
how to Read Txt file(XML format) in Matlab ?
xmlread

plus de 3 ans il y a | 0

Réponse apportée
How do I run same subsystem for certain number of times in Simulink?
Use the "For Iterator Subsystem" block https://www.mathworks.com/help/simulink/slref/foriteratorsubsystem.html

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
setting decimal point precision in handles.object
As you can see, the value for "editable text field" should be string. You can't do "set(handles.triAreaCalcFld,'String', area)"...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Is there a way to make a persistent variable using the C Caller block?
Your MATLAB release is R2018b so I assume you are referring the "C Caller" block, not the "C Function" block. "C Caller" block ...

plus de 3 ans il y a | 0

Charger plus