回答済み
Display Simulation Time at 'First' Falling edge of a signal only in Simulink
You can add an Enable block to make it Enabled Triggered subsystem. Add a counter to enable it only before the first trigger. ...

3年以上 前 | 0

回答済み
Facing Issue with Simulink Bus Creator Block
Double click the signal line out of the Constant block and type in the signal name. Constant "block name" is not the same as s...

3年以上 前 | 4

| 採用済み

回答済み
'String scalar or character vector must have valid interpreter syntax' in waitbar
What is the issue? I don't have any error message in R2022b. h=waitbar(0.5,'c:\abc\xyz')

3年以上 前 | 0

回答済み
Matlab / Simulink Block Error
The "State Name" parameter of the Integrator block, where you set as "V0", should not be a value. It is a "Name". It should be s...

3年以上 前 | 1

| 採用済み

回答済み
I am unable to find how to fix the error for the message 'Inferred size ('[7]') for data 'yOut' does not match specified size ('[3]')' for my PID controller problem
You have to straighout your design first. The reference has three elements, thus the feedback, the error and the PID controller ...

3年以上 前 | 0

| 採用済み

回答済み
simulink source that follows a sequence until it reaches a constant value
You have the arry of time-value pairs. Use them in a 1-D lookup table. Use the simulation clock as the input, specify "Clip" for...

3年以上 前 | 0

| 採用済み

回答済み
Why am i getting complex number?
Are you sure you got complex numbers? Complex numbers are like below. clear i j; i j a=2+3i b=4-5j

3年以上 前 | 0

回答済み
Simulink State Space Error
Your A, B, C, D values specify that the size of the input is 2x1 (two inputs) but the Step block provides only one input.

3年以上 前 | 0

回答済み
Run a script on all files in a folder/subfolders
I think the approach here can be used. https://www.mathworks.com/matlabcentral/answers/1934245-want-to-iterate-over-subfolders-...

3年以上 前 | 0

| 採用済み

回答済み
Load data from *.mat file with mask
For string parameters like folder and file name, you might not be able to pass it from the mask to the inside block parameter. I...

3年以上 前 | 0

回答済み
Convert osm data to xodr
Mathworks' RoadRunner can do it but if you don't have a license, try the open-source SUMO with its netconvert. https://sumo.dlr...

3年以上 前 | 0

回答済み
Parameters of FunctionCall block in Simulink
Click "Help" to bring up the document. It is there. get_param(gcb,'FunctionPrototype') 'InputArgumentSpecifications' 'OutputA...

3年以上 前 | 0

回答済み
Want to iterate over subfolders within folder
Files=dir('**/*.xlsx') will give you a list of all the .xlsx files in the folder and sub-folder. Observe Files(1), Files(2), .....

3年以上 前 | 0

| 採用済み

回答済み
Is it possible to control where the ADC samples within a period? MATLAB Simulink C2000 F28379D
Not too many people noticed this. In the case of a discrete sample time, the vector is [Ts, To] where Ts is the sampling perio...

3年以上 前 | 0

回答済み
Why can't the index variable of a for loop be stored in a structure or other array?
There is no mention of any requirement on the name of the index varialbe, here in the document for "for", https://www.mathwork...

3年以上 前 | 0

回答済み
How to obtain a vector (A) of 11 rows (output MATLAB Function block), from a vector (B) of 501 rows (input to the MATLAB Function block)?.
The straight solution is to use below. function y=f(A,B) temp=sqrt((A).^2+(B).^2); y=temp(1:49:450); Simulink is strict on k...

3年以上 前 | 0

回答済み
Using Try/For loop to allocate correct serial port number
See help document for "break" and "continue" for k=1:100 port=sprintf('COM%d',k); try ND280 = serialport(por...

3年以上 前 | 0

| 採用済み

回答済み
How to fetch the documentation content of a Doc block?
See this Answer. https://www.mathworks.com/matlabcentral/answers/521695-my-docblock-data-doesn-t-update-programmatically

3年以上 前 | 0

回答済み
update a parameter in function block each timestep in simulink
Use the "Ramp" block to generate such a signal.

3年以上 前 | 0

回答済み
Simulink, simout problem
The error is from the Simulink model itself. It can't determine the size of certain signals, most likely from the MATLAB Functio...

3年以上 前 | 0

回答済み
Error evaluating 'InitFcn' callback of block_diagram 'SIMULINK_MODEL'. Callback string is 'MATLAB_MODEL' Caused by: Error using MATLAB_MODEL
Most likely, it is looking for a file named "MATLAB_MODEL_v20180919.m". Search for that file and check if the folder is in your ...

3年以上 前 | 0

回答済み
Simulink: changing gain based on input
For this, it sounds like you just need a Gain block. Set the gain value to be 255/pi, when the input is 0, the output is 0. When...

3年以上 前 | 0

回答済み
I want to correct this command please
The three equations form a non-linear ODE with three independent variables (x,y,z). Because they are coupled, you can't solve th...

3年以上 前 | 1

回答済み
Why can I break Simulink library links by right-clicking in the model, but can't programmatically?
"Implicit" means Block resides in library block and is itself not a link to a library block. Suppose that A is a link to a subsy...

3年以上 前 | 1

回答済み
Extracting values from a string - Matlab
You got string array (" ") and char array( ' ') mixed. See which data format fits you better. ind = "i 1 1" ind(1) ind2=char(...

3年以上 前 | 0

| 採用済み

回答済み
How to log signal data from simulink to matlab with higher time interval to avoid high data storage?
Set the "Decimate data" to be 300. It means log every 300th data. It may not guarantee 0.3 second if using variable step size so...

3年以上 前 | 1

| 採用済み

回答済み
Find maximum value in a column of each cell in a large set of cell array?
c={rand(10),rand(11),rand(12)}; N=5; cellfun(@(M) max(M(:,N)),c)

3年以上 前 | 0

| 採用済み

回答済み
I would like to convert data of double type to single type before code generation in 2020A Simulink, without using Cast blocks on most functions.
See this example Validate a Single-Precision Model

3年以上 前 | 0

| 採用済み

回答済み
Unable to use the variable from workspace which is sent to the MATLAB workspace using 'To workspace' block of the Simulink.
"Unable to read file 'IEEE_14_Bus_System_SM_FFR.mat'. No such file or directory." Make sure you have that .mat file. Use Comman...

3年以上 前 | 0

| 採用済み

回答済み
Returning output signals from a Simulink block to Matlab
Access Data in a MATLAB Function During Simulation

3年以上 前 | 0

| 採用済み

さらに読み込む