Risposto
Separate a signal in two signals with Simulink
Pre-process the data in MATLAB and then import the two splitted data sets into Simulink. Or Use the "Selector" block. In the di...

oltre 3 anni fa | 1

| accettato

Risposto
Creating custom model advisor checks for Stateflow
Yes. Use find(xxx, '-isa', 'Stateflow.Data') to find and then get(). web(fullfile(docroot, 'stateflow/api/properties-and-method...

oltre 3 anni fa | 0

| accettato

Risposto
Error "An input signal to a Merge block must be connected and must originate from a conditionally executed subsystem that is not an Iterator subsystem"
For this particular case, use a Switch block to replace the Merge block. "u1" can be used to control the switch.

oltre 3 anni fa | 0

| accettato

Risposto
Dimension 1 is fixed on the left-hand side but varies on the right ([512 x 512] ~= [:? x :?]).
m and n are specified as "Input" to the MATLAB Function block, so their value could vary during simulation although you probably...

oltre 3 anni fa | 0

| accettato

Risposto
Can folks replicate the discrepancy in the number of model advisor checks between command line and dialog box queries for R2021b and R2022a?
I can see the differences in R2022b. You want to know why they are different, or what exactly are the difference? From the Mode...

oltre 3 anni fa | 0

Risposto
Mask parameters now have compulsory box for alias in property editor. What is it for?
The R2022b online documentation does not seem to match the documentation from the installation. It seems to be a mistake in the ...

oltre 3 anni fa | 0

Risposto
perform interpolation each row of a matrix
You can use interp1() directly for this without for-loop. x=1:10; A=(1:10)'+(1:10); xi=5; y=interp1(x,A',xi)

oltre 3 anni fa | 0

Risposto
About the use of Data Store Memory
From https://www.mathworks.com/help/releases/R2022b/simulink/slref/datastorememory.html "You can use Simulink.Signal objects in...

oltre 3 anni fa | 0

Risposto
Question about toolbox dependencies
I think you've found a bug. Report it to the Mathworks or see if they already reported this. I tried your example in R2020b and...

oltre 3 anni fa | 0

Risposto
Simulink model diverges depending on Stop time (tend)
This is odd and rare but could be explained. First of all, your model or dynamics is probably on the boardline of being unstab...

oltre 3 anni fa | 0

| accettato

Risposto
Where is the User's Manual?
I would click the "Help" button on the dialog. It should bring up the doc or manual since it is mentioned in the description of ...

oltre 3 anni fa | 0

Risposto
simBiology exported model simulation output not in the same order as `InitialValues`
For a Simulink simulation, there are Inputs, Outputs and States. Usually, only States need initial values. From "exported_mode...

oltre 3 anni fa | 0

Risposto
step function gives Error using step Not enough input arguments.
Not the correct way to use step(). It is used to get the step response of a system, not to get the step input signal. You can u...

oltre 3 anni fa | 0

Risposto
Is there a way to get MATLAB Function name defined in Simulink block programmatically ?
myconfig = get_param(gcb, 'MATLABFunctionConfiguration') and parse the text, you might be able to get it. web(fullfile(docroot,...

oltre 3 anni fa | 1

Risposto
Extract specific values from a 3D matrix?
A(sub2ind(size(A),row_index,col_index))=B For example A=false(6,6,6); row_index=[4, 3]; col_index=[4,5]; B=[true;true]; ...

oltre 3 anni fa | 0

Risposto
Function variables are resolved in the workspace, not a .Simulink.Signal. object
In the MATLAB Function block editor, click menu button "Edit Data", in the "Property Inspector", "Symbols" section, find and sel...

oltre 3 anni fa | 0

| accettato

Risposto
Output sizes for MATALB function block in Simulink.
It is interesting that you want to do this. Does the solution "B" always exist? How many solutions are there and are there alway...

oltre 3 anni fa | 1

| accettato

Risposto
Workspace variable and simout
Your question is too generic. It's better to give specific example or block usage. A "parameter" of a block is meant to be cons...

oltre 3 anni fa | 0

| accettato

Risposto
How to open a saved figure?
If you have the figure saved in a .fig file, I think it should be open('file/subfolder/fighandle.fig')

oltre 3 anni fa | 0

Risposto
Is there a figure tab in desktop matlab (R2022b)?
If you are talking about the "PLOTS" tab, yes it is there. https://www.mathworks.com/help/matlab/learn_matlab/desktop.html

oltre 3 anni fa | 0

Risposto
Can I use another filename instead?
Yes and it's better.

oltre 3 anni fa | 1

Risposto
Array operations on simulink math function for maximum efficiency
Instead of using "For Iterator Subsystem" block and "Math Function" block, I would suggest using the "MATLAB Function" block. ...

oltre 3 anni fa | 0

| accettato

Risposto
Is there any method to import the ecg samples(.mat file) in simulink and display the signal into the scope
From File block See example model in the doc

oltre 3 anni fa | 0

Risposto
compare 2 consequtive columns ?
data=[3 3 4 4 5 5 6 6 5 5 8 8 9 9 7 7 2 2]; index=diff(data,1,2) index2=any(index) output=sum(index2) OutData=data...

oltre 3 anni fa | 0

| accettato

Risposto
Get signal lines in a linked library in Simulink
Not sure if "link1.slx" is a model/subsystem or a library, which results in a subsystem reference or a library link. In any cas...

oltre 3 anni fa | 1

Risposto
identifying entry elements in rows of logical matrix
in = [1 1 1; 0 1 1; 0 0 0; 0 1 0]; M=size(in,1); temp=[zeros(M,1), in]; d=diff(temp,1,2); out=(d==1)

oltre 3 anni fa | 0

Risposto
How can we resolve the error caused by - Dictionary entry value class 'DATA.Signal' is undefined ?
It seems like DATA.Signal is a customized class, for example, built on top of the Simulink.Signal class. Or, it could be a class...

oltre 3 anni fa | 0

Risposto
Simulink - 'MaskPortRotation' is read-only?
If it is read-only, then leave it alone. Don't try to set it. Port Location After Rotating or Flipping Mask Parameters

oltre 3 anni fa | 0

Risposto
Can the descriptions of all Model Advisor checks for R2021a be exported to Matlab workspace?
something like this: Model='f14'; open(Model); ma = Simulink.ModelAdvisor.getModelAdvisor(Model); Checks=ma.CheckCellArray; ...

oltre 3 anni fa | 0

| accettato

Carica altro