Answered
create cell from array with specified size
num2cell(mymatrix)

2 months ago | 0

Answered
Configure signal logging programmatically (Simulink)
You could re-set all those 200 signal loggings and then set what you want to log programingly. lh=find_system(ModelName,'FindAL...

2 months ago | 0

Answered
Convert date data in datetime
You could treat the last two digits as duration. Code below is not optimized but gives the correct result. load Data.mat; date...

2 months ago | 1

Answered
How to configure set_param() per instance for arrays
This is "For Each Subsystem". You need to know how to use it. See the document and examples. https://www.mathworks.com/help/sim...

2 months ago | 0

| accepted

Answered
SOC Estimator (Coulomb Counting) gives values above 1 because of current profile. How can I limit this to 1, but descent whenever the current is discharging?
SOC is the integration of current. The "Coulomb Counting" block does not have an option to saturate so your options are limited....

2 months ago | 1

| accepted

Answered
How can I assamble n identical blocks in a simscape simulation automathically?
It is possible. Use add_block() to construct the blocks, but repeating 100 times in one model doesn't sound reasonable. Because...

2 months ago | 0

| accepted

Answered
How to take out temperature data of one battery cell from battery pack to use it for controller design?
Use the Selector block. The dialog might be intimidating to some. For your case, change the "Inport port size" from "3" to "25",...

2 months ago | 0

| accepted

Answered
open .m file GUI in GUIDE
It depends. If the existing tool is developed using GUIDE and the GUI components are saved in a .fig file, then you can use GUID...

2 months ago | 0

Answered
Simulink equivalent of inputname () or genvarname() for logging
Not sure if you are aware, the MATLAB Function block is typically executed at every simulation step. So even if inputname() and ...

2 months ago | 1

| accepted

Answered
Set default font settings for Simulink annotation (comments)
I don't think there is a way to pre-set the default font. But you can do a quick and easy post-processing like this. It will cha...

2 months ago | 1

| accepted

Answered
Integrate C Code by Using the MATLAB Function Block in matlab 2015b
The online document for R2015b is not available. The oldest available is below. Notice the "R2018b" in the http address https:/...

2 months ago | 1

Answered
How do I use Individual license for Matlab and Simulink, but Network License for Simscape?
"Note: In the license file locations, MATLAB will search for a license.dat first and then any .lic in alphabetical order." Easi...

2 months ago | 0

| accepted

Answered
How to add blocks and lines to Simulink subsystem upon model initialization?
"I would like to add these blocks programmatically upon model initialization". What is your definition of "model initialization"...

2 months ago | 0

Answered
How to add several forced line breaks inside a table cell, when I try to generate a Microsoft word report using Matlab?
I tried and the line break in a cell in an Excel file is char(10). I think it is likely the same in Word. In MATLAB, newline is...

3 months ago | 0

| accepted

Answered
Run functions before Simulink starts
The PreLoadFcn or InitFcn callback. https://www.mathworks.com/help/simulink/ug/model-callbacks.html

3 months ago | 0

Answered
where i can get MISRA AC SLSF 2023 documentation or pdf or Quotation to buy?
https://misra.org.uk/product/misra-ac-slsf2023/

3 months ago | 0

Answered
Why does argmin index of NaN array have a value of 1 and not NaN?
Maybe the index is indeed returned by matching the min value to the input vector. Why does it matter? What is the significance i...

3 months ago | 0

Answered
Standalone code generation is not supported for model
It sounds like that you can't do standalone code generation on this "component model". You have to create another "main" model, ...

3 months ago | 0

Answered
Modify or adding data in SimulationOutput
"Caching the results of the first simulation run. Perform the second simulation run." If you can do both of the above, then you...

3 months ago | 0

Answered
How to add multiple "display" block to multiple subsystems in a simulink file programmatically
Yes you can do it programmingly. see help for find_system() and do something like this: AllSys=find_system(ModelName, 'SearchDe...

3 months ago | 0

Answered
How to fix the problem of fetching the simulink block from the customized library in the matlab app designer using matlab app designer code?
It is because your customized library is not set up as "simulink/mylib". It is unlikely you can add your library to underneath "...

3 months ago | 0

Answered
How to import constant data from an Excel sheet into Simulink
Use Constant blocks to specify these values in the Simulink model. Use Variables to specify the value for those Constant blocks....

3 months ago | 1

| accepted

Answered
How to "Create new data" for a custom library block
Create a Mask for your customized library block, then when you double click the block, you will have a dialog to specify that pa...

3 months ago | 1

Answered
How can I overlay Simulink curves obtained when model parameters are changed?
Not on the Scope block, but these days you can utilize the Simulink Data Inspector (SDI). Run simulation multiple times and then...

3 months ago | 1

| accepted

Answered
Data Object Wizard Usage - Does Base Workspace encompass Model Workspace?
"If you create the signal object in a model workspace, you must set the Storage class parameter to Auto.", from https://www.mat...

3 months ago | 0

Answered
how can I fix this error "Illegal use of reserved keyword "end"."
It seems that you have an extra line of "end". Just delete that line

3 months ago | 0

Answered
Input signal as vector with time in simulink
u1 = [Data(:,1) Data(:,2)], u2 = [Data(:,1) Data(:,3)] and u3 = [Data(:,1) Data(:,4)] The way you construct the data for "From ...

3 months ago | 0

Answered
How to set "Argument" property of a Simulink.Parameter programmatically ?
See below, A Simulink.Parameter object does not have a property called "Argument". a=Simulink.Parameter

3 months ago | 0

Answered
Matlab Function Block in a Simulink Model
You can't expect to achieve your goal by doing this. The sequence of the MATLAB Function block can be simplified as this, read ...

3 months ago | 0

| accepted

Answered
Simulink - Input Dialog box while saving the model
Utilize the 'PreSaveFcn' callback of the model, where you can launch a dialog window, ask the user to input a new version number...

3 months ago | 1

| accepted

Load more