回答済み
Naming signal in simulink based on workspace variable value.
It can't be done like a numerical parameter, where you can type in e.g. pi, instead of 3.1415926535 But it can be done through ...

3年弱 前 | 0

回答済み
I face this error every time.
The referred mdlStart.m file must have been accidently modified or over-written. The original file is a M-file function. The mes...

3年弱 前 | 0

回答済み
How to change the width of the command window?
Apparently, the width won't be big enough even if you could adjust it. Try this: a=1:100; open a

3年弱 前 | 0

| 採用済み

回答済み
Simulink Matlab function block output is inferred as a variable-size matrix, but its size is specified as inherited or fixed
There are issues with the code. The size of "inputStream" is going to grow indifinitely. I suggest using a Buffer block to repl...

3年弱 前 | 0

| 採用済み

回答済み
Changing the font size in the mask gives warning
You may not realize, text() used in Simulink Mask doesnot have full functionality as in MATLAB. See this note in the doc. While...

3年弱 前 | 0

回答済み
How to select specific data rows from neighboring column
index=and(T(:,1)>=21, T(:,1)<=30); x=T(index,4); y=T(index,3); z=T(index,2);

3年弱 前 | 1

| 採用済み

回答済み
loss of data/missing elements in array after a for loop
If you don't pre-allocate idx_matrix_bool_mat_filt, this could happen. Do idx_matrix_bool_mat_filt=TD_32_colon before the loop. ...

3年弱 前 | 1

| 採用済み

回答済み
How to change variable name in MAT file
Save the .mat file as what it is from the source. Use a=load('*.mat') to load it. "a" would be a structure. The variable is in a...

3年弱 前 | 1

| 採用済み

回答済み
Dialog box in the mask for different equations
A few steps. Change the name of the "Interpreted MATLAB Function" block to be "MyFun", so it's easy to reference it in the code...

3年弱 前 | 1

| 採用済み

回答済み
How can I write an array to a txt file such that it looks like MATLAB syntax
use mat2str(), write the string to the text file A = [1 2 3 4; -1 0 1 2; 3 9 5 7; 12 100 1000 1012]; str=mat...

3年弱 前 | 0

| 採用済み

回答済み
mapping between two different matrices
a=[1 2;3 4;5 6]; b=[1 2 3;1 2 3;1 2 3;1 2 3;1 2 3]; c=[1 2]; [~,index]=ismember(c,a,'rows'); b(:,index)

3年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

回答済み
Add brake block to simulink
It is a "Switch" block, inside Simulink, Signal Routing.

3年弱 前 | 0

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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

さらに読み込む