답변 있음
"Cannot find state N in the given variable." Error when trying to start a simulation using previously saved states.
set_param(model, 'LoadInitialState', 'on') just turns on that checkmark, you need to provide the variable for the initial state....

2달 전 | 0

답변 있음
How do you sum a signal in Simulink?
https://www.mathworks.com/matlabcentral/answers/1736595-cumulative-sum-in-simulink

2달 전 | 0

| 수락됨

답변 있음
Cumulative sum in Simulink
For continuous system, feed your signal to an Integrator block. For discrete system, add your signal with the output of a Unit ...

2달 전 | 0

답변 있음
How to create a running window inside simulink model in MATLAB/Simulink that can take some sample of input data at every 0.05 sec time instance & feed to the MATLAB program ?
This is the fundermental basic of the Simulink simulation. If nothing is constrained, set the solver to be discete, with fixed ...

2달 전 | 0

답변 있음
Storing workspace variables that match the specified regular expressions.
see "doc whos" s=whos('-regexp','^ex_[1]*|^i.\d+')

2달 전 | 0

| 수락됨

답변 있음
How can I access to the Model Workspace from my Simulink file from a Matlab function block
In the MATLAB Function block, click "edit data", add a data "MyVar", specify it as a "parameter" of the MATLAB Function block. ...

2달 전 | 0

답변 있음
How to relate between popup parameter in subsystem and switch case in matlab function?
Best way for this is to use "Variant Subsystem". See document and example There is no need to add mask anymore, although you ca...

2달 전 | 0

| 수락됨

답변 있음
how to combine sections in live script
You could do this. Move to the second section line, click the comment (%) button. Clicking the "Delete comment" button would ...

2달 전 | 0

답변 있음
Deleting Empty Rows in Cell Array
If the data is in a cell array, mostly likely cellfun() is needed, unless you use for-loop. strtrim() or strip() can remove the...

2달 전 | 0

| 수락됨

답변 있음
Taking Numerical Values From Char Array
a=['123456' '123123'] str2num(a)

2달 전 | 0

| 수락됨

답변 있음
delete Simulink(ex-sum) block and connect inport block to a bus using MATLAB coding
Something like this. You can follow the document of these functions. pSumBlock='PathToSumBlock'; hLine=get_param(pSumBlock,'Li...

2달 전 | 0

| 수락됨

답변 있음
Passing one by one values of matrix in Simulink
Data=(1:1142)'; time=0.01*(0:1141)'; Use the "From Workspace" block in your Simulink model, specify the data as [time, Data], ...

2달 전 | 0

답변 있음
How to change a global variable name in simulink (containing Data Store Memory)
On the MATLAB Function block Editor, click "Edit Data" and rename another "A" there.

2달 전 | 0

| 수락됨

답변 있음
Converting cell of numbers to double
cell2mat() cell2struct()

2달 전 | 1

답변 있음
How to input this vector in simulink ?
Use the "From Workspace" block, specify the data as [t', phi'], connect it to a Scope. But the value in "t" is not incremental,...

3달 전 | 0

답변 있음
Looking for a function to get Number and Names of Input/Output from a model
If the Inport/Outport block names are good enough, blks=find_system('ModelName','FindAll','On','SearchDepth',1,'BlockType','Inp...

3달 전 | 0

| 수락됨

답변 있음
How can I modify programmatically model data design ?
get_param('ModelName','DataDictionary') set it to be empty will force to use base workspace set_param('ModelName','DataDiction...

3달 전 | 0

| 수락됨

답변 있음
Testing a cell array if it is a string
a={'abc', 123, 'xyz',0}; b=cellfun(@isstr,a)

3달 전 | 0

| 수락됨

답변 있음
How to select consecutive rows at regular intervals?
index1=[repmat(false,20,1);repmat(true,30,1)]; index2=repmat(index1,20,1); A=rand(1000,3); B=A(index2,:)

3달 전 | 0

답변 있음
Simulink fixed-step size protected variable name
If you set the fixed step size to be a particular value, you can get the value using the following command get_param('ModelName...

3달 전 | 0

| 수락됨

답변 있음
repeat an array (a signal) over a specific period
new_phi=repmat(phi,1,200)

3달 전 | 0

| 수락됨

답변 있음
MATLAB certification/verification/validation
Not for MATLAB, but for certain Simulink products. https://www.mathworks.com/products/do-178.html#qualifying-tools https://www...

3달 전 | 0

답변 있음
Update subsystem's Block parameters for all the subsytems in a model.
h=find_system('ModelName','FindAll','on','BlockType','SubSystem') set(h,'TreatAsAtomicUnit','On') You might need to refine you...

3달 전 | 0

| 수락됨

답변 있음
Turn off Content Preview Enabled when creating a subsystem in simulink
When you add the Subsystem block, it is empty (no contents). I guess maybe due to that, 'ContentPreviewEnabled' can't be set as ...

3달 전 | 0

답변 있음
Changing plot colors directly in .fig files
Use findobj() to find the line, set the color to be [Red Green Blue] >> b=findobj(a,'type','line') b = Line with properties:...

3달 전 | 1

| 수락됨

답변 있음
License info missing in license function - How to see which licenses I have checked out?
"ver" returns the toolboxes "installed" on your computer. You could run Info=license('inuse'). Check each Info(1), Info(2) to s...

3달 전 | 0

답변 있음
comment out many SubSystems in my Model in Simulink using for loop.
num2str()

3달 전 | 1

| 수락됨

답변 있음
Error while saving Simulink model
run "dbstop if error" in MATLAB Command Window first and then save, see if you can get any lead where the error occured.

3달 전 | 0

더로드