Answered
Taking Numerical Values From Char Array
a=['123456' '123123'] str2num(a)

26 días ago | 0

| accepted

Answered
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...

30 días ago | 0

| accepted

Answered
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], ...

alrededor de 1 mes ago | 0

Answered
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.

alrededor de 1 mes ago | 0

| accepted

Answered
Converting cell of numbers to double
cell2mat() cell2struct()

alrededor de 1 mes ago | 1

Answered
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,...

alrededor de 1 mes ago | 0

Answered
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...

alrededor de 1 mes ago | 0

| accepted

Answered
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...

alrededor de 1 mes ago | 0

| accepted

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

alrededor de 1 mes ago | 0

| accepted

Answered
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,:)

alrededor de 2 meses ago | 0

Answered
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...

alrededor de 2 meses ago | 0

| accepted

Answered
repeat an array (a signal) over a specific period
new_phi=repmat(phi,1,200)

alrededor de 2 meses ago | 0

| accepted

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

alrededor de 2 meses ago | 0

Answered
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...

alrededor de 2 meses ago | 0

| accepted

Answered
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 ...

alrededor de 2 meses ago | 0

Answered
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:...

alrededor de 2 meses ago | 1

| accepted

Answered
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...

alrededor de 2 meses ago | 0

Answered
comment out many SubSystems in my Model in Simulink using for loop.
num2str()

2 meses ago | 1

| accepted

Answered
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.

2 meses ago | 0

Answered
Creating a logic vector out of 2D matrix
M(i,i) == M(i,0) should be M(i,2) == 0 When you have this type of error on a very simple script, put a break point and run th...

2 meses ago | 0

Answered
How do I map a model simulink version obtatained with Simulink.MDLInfo('mymodel') to a MATLAB version (e.g. R2021b)
It looks like Simulink.MDLInfo() will give you 'ReleaseName'. I am running this in R2018b on an example model 'f14' and an old m...

2 meses ago | 0

| accepted

Answered
Erase this character ''←''
double('←') strrep({'←Matlab←←'},char(8592),'') strrep({'←Matlab←←'},'←','')

2 meses ago | 0

| accepted

Answered
Name of Bus at input or output port of a block
"Inbus" and "Inbus2" here are the tag names of the "From" block. They have nothing to do with the bus name, of curse except that...

2 meses ago | 0

| accepted

Answered
Open a masked subsystem (look under mask) in command line
open_system(blk,'force') looks under the mask of a masked block or subsystem. It opens the dialog box of the block under the mas...

2 meses ago | 0

| accepted

Answered
How to code a time delay specified by a value saved in a parameter structure in a Matlab block?
In the MATLAB Function block editor, click the "edit data" button, then add parameter. Define the "myParams" in base workspace a...

3 meses ago | 0

Answered
Create a Simulink model using command Lines
add_line()

3 meses ago | 1

Answered
Creating a Simulink model using command Lines
The property name for Capacitance is 'c' set(gcbh,'c','1e-5')

3 meses ago | 1

Answered
Matlab signal propagation error
Here is the root cause. It is due to the difference between R2020b and earlier versions. You have to figure out how to deal with...

3 meses ago | 0

Answered
Where is Switch (Relay) in Simulink?
https://www.mathworks.com/help/physmod/sps/ref/spdtrelay.html?s_tid=doc_ta https://www.mathworks.com/help/simulink/slref/manual...

3 meses ago | 0

| accepted

Load more