Answered
How to store all the sequential signals generated during the Simscape simulation in Simulink and access those signals inside the function block?
The "Buffer" block? https://www.mathworks.com/help/dsp/ref/buffer.html

3 years ago | 0

Answered
Simlink pulse generator rise/fall time
Use a "Repeating Sequence" block and provide the time-value pairs. If your version of Simulink has the "Signal Builder" block, a...

3 years ago | 0

Answered
Moving average with a time window 600s but using a variable step modeling setting
Same question? https://www.mathworks.com/matlabcentral/answers/1917080-discrete-average-on-simulink

3 years ago | 0

| accepted

Answered
TO WORKSPACE BLOCK IS NOT CREATING NEW VARIABLE TO WORKSPACE
It is saved in "out.simout", instead of "simout" if your variable name is "simout", if every other setting is by default. You ar...

3 years ago | 0

Answered
How to solve the problem of finding an unconnected output signal line on 'untitled/radar' (output port: 1)
The "Camera" and "Radar" block both have un-connected output signal lines (the red dotted arrow). Connect them to something usef...

3 years ago | 0

Answered
How to create a list of all variable names/block parameter values used in a Simulink model?
This might be it. Model Data Editor

3 years ago | 0

Answered
Where can I find Simulink block element identifier?
get_param(FullBlockPath, 'SID') Please see this Q&A. https://www.mathworks.com/support/search.html/answers/601471-how-can-we-u...

3 years ago | 0

| accepted

Answered
I have data for each milli second. How can I average the 1000 samples and convert in to 1 sec? I got 322 sec data. 1K samples for each second.
Data=(1:25)'; Ten=10; NofData=floor(length(Data)/Ten)*Ten; temp=reshape(Data(1:NofData),Ten,[]) av=mean(temp)

3 years ago | 0

Answered
Add brake block to simulink
It is a "Switch" block, inside Simulink, Signal Routing.

3 years ago | 0

| accepted

Answered
How to concatenate (insert, add) a scalar value into a vector using the Simulink Matlab Function block?
With variable "A" in the base workspace, you can run "diff(A)" in Command Window to get the result. If you want to use the same...

3 years ago | 0

Answered
Making a datetime vector with a leap year
Do it directly by specifying the starting and ending datetime. d1=datetime(2021,1,1,0,0,0); d2=datetime(2021,12,31,23,0,0); s...

3 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 4

| accepted

Answered
'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 years ago | 0

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

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

3 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
update a parameter in function block each timestep in simulink
Use the "Ramp" block to generate such a signal.

3 years ago | 0

Load more