답변 있음
Error Meassage Simulation of model '....' is not allowed because it is a 'subsystem' block diagram
sim() starts the simulation of a "model", not a "block" inside it. To simulate that subsystem block, you have to copy that sub...

3년 초과 전 | 0

답변 있음
Limit value to a function
y1=sin(0:0.1:10); y2=min(y1,0.8); plot(y2)

3년 초과 전 | 0

| 수락됨

답변 있음
SIMULINK Lookup table for several inputs and outputs
2-D lookup table or n-D lookup table will do. Check the block document for examples.

3년 초과 전 | 0

답변 있음
How to cut the desired signal?
In general, t=0:0.1:3.5; signal=0:35; index=and(t>=1.5, t<=2.0); new_t=t(index); new_signal=signal(index); plot(new_t, new...

3년 초과 전 | 0

| 수락됨

답변 있음
Cannot use equal operator to test function argumants
a = input('Enter first value: ') "a" is already a numerical value. You don't need all the str2double() calls. when you call s...

3년 초과 전 | 0

| 수락됨

답변 있음
Simulink Local function debug gives "Undefined function 'myFunc' for input arguments of type 'double'"
Don't do "F9". Add a break point in the Editor, press the "Step" and other buttons to debug.

3년 초과 전 | 0

답변 있음
replace initial matrix with a new one on Simulink
All you need is a "Product" block and a "Unit Delay" block. Use the "Unit Delay" block to get the value of s from previous step....

3년 초과 전 | 0

답변 있음
In simulink ,a feedback system, how may I use different row in a matrix input every single time?
Use the "From Workspace" block to import A. Read the Help document of the block to understand the needed format. Basically, yo...

3년 초과 전 | 0

답변 있음
Sort a string array according to equivalent names of another string array
names=["A";"B";"C";"D";"E"]; S1=["d";"c";"e";"a";"b"]; [~,index]=ismember(names, upper(S1)); S2=S1(index)

3년 초과 전 | 0

| 수락됨

답변 있음
Integral in Simulink fcn Block
You need to understand the difference between MATLAB and Simulink. This Simulink block diagram will give you the curve. Set th...

3년 초과 전 | 0

답변 있음
Is it possible to have tags=signal name in Simulink?
No. I could think of two reasons not to do that. In many models, many signal lines have no label (i.e. the "signal names" are ...

3년 초과 전 | 0

답변 있음
Cant use Excel names to fprintf?
see this example fname={'abc'}; fprintf('%s',fname) fprintf('%s',fname{1})

3년 초과 전 | 0

답변 있음
How to replace a single Simulink block with self-modifying mask block with same interface, maintaining all connections
I was able to duplicate your problem. I don't know why. Need more time to figure it out. But I did find an alternative. Basical...

3년 초과 전 | 0

답변 있음
Change cell object to char
a={'abc'} whos a b=char(a) whos b

3년 초과 전 | 0

답변 있음
Function with multiple inputs to function with vector input
f=@(z1,z2,z3) z1+z2+z3; f(1,2,3) a=1:3; b=num2cell(a); f(b{:})

3년 초과 전 | 0

| 수락됨

답변 있음
Error with writing a function
You must have included this in your script. This is not all of your code. The direct solution for this is to add an "end" line ...

3년 초과 전 | 0

답변 있음
How to use SIL simulation with a simulink model containing continous blocks.
You could run the whole model in SIL or PIL. Or you could select a subsystem, right click, replace it with a SIL or PIL componen...

3년 초과 전 | 1

| 수락됨

답변 있음
How do I change drop - down value of a block in Simulink model for my simulation input object?
For changes like this, if you do it manually, meaning changing from 'Element-wise(K.*u)' to 'Matrix(K*u)', the Simulink model is...

3년 초과 전 | 0

| 수락됨

답변 있음
Is it possible to creat a text list of signal names in a bus?
See if this helps you. Your model must have passed model update (Ctrl+D) without error. Select a BusSelector block where the in...

3년 초과 전 | 0

| 수락됨

답변 있음
Need to check input between range and convert it if not
The best way is to make sure theta is within [-pi, pi]. All trigonometry functions in MATLAB/Simulink has a defined output range...

3년 초과 전 | 0

| 수락됨

답변 있음
How to call one of the outputs of the function?
phi_ave_x = crk4_aee321_Lorentz(xi,yi,zi,dt) [phi_ave_x, phi_ave_y] = crk4_aee321_Lorentz(xi,yi,zi,dt) [phi_ave_x, phi_ave_y, ...

3년 초과 전 | 0

답변 있음
How can I get rid of error--'Model' Parameter must be a character vector
If your model name is 'codetrial', then it should be sim('codetrial').

3년 초과 전 | 0

답변 있음
Simulink unspecified data dimension
Open the MATLAB Function block Editor, click "Edit Data", specify the dimension (size) information of the output data "dist".

3년 초과 전 | 0

답변 있음
Enable block vs atomic block
The atomic subsystem is executed at 4s, 8s, 12s, etc. if enabled. It is not "after it is enabled (regard this as time 0), then ...

3년 초과 전 | 0

답변 있음
Detect change between two stateflow
Are you looking for https://www.mathworks.com/help/simulink/model-comparison.html

3년 초과 전 | 0

답변 있음
Retrieve Simulink model input dimensions using matlab
I think Simulink has a series of ways to determine the signal dimensions. Propagation takes higher priority than back propagatio...

3년 초과 전 | 0

| 수락됨

답변 있음
Why aren't global variables being recognized in Simulink model explorer?
Double click "MATLAB Function1" to open the Editor, click "Edit Data" button, add data "B" as a "Data Store Memory".

3년 초과 전 | 0

| 수락됨

답변 있음
Locate MATLAB Class Definition File
'datetime' is a MATLAB class. a=datetime which datetime

3년 초과 전 | 0

| 수락됨

답변 있음
Variable not recognized from workspace parameter
In the MATLAB Function block editor, click "Edit Data", specify "Bm" as a "parameter"

3년 초과 전 | 1

| 수락됨

답변 있음
Plot Array in Simulink scope
Use a "From Workspace" block to read the data from the workspace to Simulink, then connect the output to a Scope. To show in a...

3년 초과 전 | 0

더 보기