Beantwortet
How to input a text variable in a plot title?
Is this what you want? title('plot title') TitleText='second plot'; title(TitleText)

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Where Can I find these signals in SIMULINK?
Simulink, Sources, Repeating Sequence, specify time as [0 1 3 4], output as [0 1 -1 0] Simulink, Sources, Repeating Sequence,...

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to fix error in Simulink "data read before being written to" ?
If you don't care that much, go to Model Configuration Parameters (Ctrl+E), Diagnostics, Stateflow, Read-before-write to output ...

etwa 8 Jahre vor | 0

Beantwortet
Time delay for variable
use the "Zero-order hold" block, specify 1 second as the sample time

etwa 8 Jahre vor | 0

Beantwortet
How to set Stateflow properties in Stateflow Model Explorer using matlab script?
See <https://www.mathworks.com/help/stateflow/api/creating-and-destroying-api-objects.html?searchHighlight=stateflow%2520api&s_t...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Simple Explaination of the Rate Limiter Block
Specifing the slew rate as e.g. 5/(25*10e-9) and -5/(25*10e-9) should give you a Trapezoid form. Specify the fixed simulation st...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Can I call a function defined within another function .m file?
No. It is a local function. If it needs to be used outside, it has to be saved in a separate .m file. See <https://www.mathwo...

etwa 8 Jahre vor | 0

Beantwortet
Find the number of times a number is in an array for every column
Hope this give you a clue a=rand(3,9)-0.5; b=a<=0; c=sum(b)

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to convert ModelDataLogs to Structure
This might help. Assume your logged data is "logsout", run logsout.unpack('all') to unpack all the data and then do whatever ...

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
I cannot open the buck converter with thermal dynamics example file
It needs the "Simscape Electronics" toolbox. It seems that you don't have that toolbox. Click the link in that page for trial ve...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Using a 'for' Loop to Pass in Excel Files
No need to use fopen() and fclose() to read Excel file. Assume "excel_files" is a 1x11 cell, each contains an Excel file name...

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
Analyzing structures created from .log files
Hope you get an array of structures. Take a look at this example and read this Blog <https://blogs.mathworks.com/loren/2008/02/...

etwa 8 Jahre vor | 0

Beantwortet
Compare to constant block doesn't work.
What is the data type of "lamba5"? I assume it is double or single. This is a typical "floating point equal or unequal compariso...

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
Indexing of cell array containing class
I tried this. It looks better to construct an array of objects, not a cell array of objects. a=[timer,timer] a.Period ...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Reset a sine wave in Simulink
Use the "Fcn" block which you can specify "sin(u)" as the function. Use an "Integrator" block with the input as constant value o...

etwa 8 Jahre vor | 0

Beantwortet
Count number of elements in a matrix
arrayfun(@(x) nnz(B==x),A)

etwa 8 Jahre vor | 1

Beantwortet
How to use Arrayfun passing a random function as its arguments?
f=@sin; R1=arrayfun(f,x1);

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to create a matrix whose elements are function of their indices?
I am not aware of such a built-in function in MATLAB without any special toolbox. A typical approach is to pre-allocate and then...

etwa 8 Jahre vor | 0

Beantwortet
can some one help me for this question?
"Embedded Coder" is not a Simulink library. It is a separate toolbox. Go to Mathworks website, Products, look for "Embedded Code...

etwa 8 Jahre vor | 0

Beantwortet
An array for multiple LHS assignment cannot contain expressions
Remove the white space in "index (i)" [~, index(i)] = min (compare_onset(i), [], 2)

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
How do I create an empty cell array of given dimensions?
a=cell(1,2,3)

etwa 8 Jahre vor | 6

| akzeptiert

Beantwortet
How do I copy a .csv file from any specified folder to the working directory where matlab is run from?
copyfile(source, destination) where source and destination can be full path of the file. pwd() will get you the current folde...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
S-Function Backward Compatibility
I doubt it. Even if it can be used, you might get constant warning messages. The document says that all example S-function ME...

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to remove the values in vector 'B' corresponding to 'NaNs' in vector 'A'?
index=isnan(A) B(index) = [];

etwa 8 Jahre vor | 2

| akzeptiert

Beantwortet
Diary file with current date and time as time stamp, Part 2
Include the full path when you specify the file, set(0,'DiaryFile',fullfile('c:',diary_filename)) or just use diary(f...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Editor and command windows next to each other, Part 2
You could select the already written comments, right click, and select "Wrap Comments", or Ctrl+J

etwa 8 Jahre vor | 1

Beantwortet
How to increment the specific command
A for-loop can be used, such as for lineNum=4:0.1:5 num2str(lineNum) end But the "lineNum" in Par.SigGen{lineNum}....

etwa 8 Jahre vor | 0

Beantwortet
How to input an argument in an Exit Shell command ?
try this system(['C:\Users\Philippe\Anaconda2\python.exe Test.py & ', ECG])

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to remove the error highlighting in Simulink?
Can you try this? select this block and then run this in Command window hilite_system(gcb,'none')

etwa 8 Jahre vor | 0

Mehr laden