Réponse apportée
Why Integrator with Wrapped State don't wrap the lower limit? (R2018b)
It should not be like that. Create a simple new model to verify it. Grab a Sine Wave block, change the amplitude to be 3, Connec...

plus de 6 ans il y a | 0

Réponse apportée
gathering two cells in confusion matrix
If you have the Image Processing toolbox, a=[1 1 3 2; 1 0 2 1 ; 7 4 3 1; 5 6 3 7]; fun = @(block_struct) sum(block_struct.dat...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Running via matlab command an .exe file and putting direct the input in cmd
Create a text file called "InputString.txt". Inside it, type in your input file name, in your exampe, file.txt Test it in Cmd w...

plus de 6 ans il y a | 0

Réponse apportée
Sum of matrix signals in Simulink
In your MATLAB Function block, open the editor, click "Edit Data" icon, find the data for output 3, set the size. Or, in your S...

plus de 6 ans il y a | 0

Réponse apportée
How to programmatically detect the difference between a figure and a random dialog or waitbar
Can you use the 'menubar' property? If not, run get(f), get(w), get(d) to compare all properties to see if you can find any uniq...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Is it possible to have a table with a numerical index instead of strings?
Keep in mind that in MATLAB, indexing like data(RowIndex, ColIndex) can be numerical or logical. The numerical index is 1-based....

plus de 6 ans il y a | 0

Réponse apportée
How to update a signal in Simulink
The true meaning of the equation is x=previous_x+a*b. Use the "Delay One Step" block (also called z-delay, unit delay, 1/z). The...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
element-wise exponential of matrix returns all 1s
It's a matter of display. Run this and show the result again. format long

plus de 6 ans il y a | 0

Réponse apportée
How to figure out the number of rows for headers?
If you use [Num, Txt, Raw]=xlsread(), can you figure it out based on the numerical, text and raw data?

plus de 6 ans il y a | 0

Réponse apportée
Show Simulink simulation progess inside Matlab skript without too much performance loss.
Add a Clock block to your root level model, or you can divide it by the totoal simulation time to get the percentage. You can us...

plus de 6 ans il y a | 0

Réponse apportée
Does my license currently include Simscape Multibody?
Simscape Multibody is a separate toolbox other than Simscape. You can run "ver" in Command Window to see if you have "Simscape M...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to hide code in S-Function block in simulink?
You have your source code (in .c or .m or Fortran), compile them into a .mex (or .dll) file using mex() command, then you can us...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Storing found values in array
I had this example code for answering a similar question. I think you can utilize it as an example for storing while-loop result...

plus de 6 ans il y a | 0

Réponse apportée
Produce equality matrix based on elements in vector.
Like this? A=randi(10,5,1); B=randi(10,5,1); k=3; C=(B==A(k))

plus de 6 ans il y a | 0

Réponse apportée
How can I insert a code that is in the MATLAB function block of my model in a report?
myMFBConfigobj = get_param(gcb, 'MATLABFunctionConfiguration') The source code is in .FunctionScript web(fullfile(docroot, 'si...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Plot(x,y2) with if condition y1(x)
You can check the output of y1>0. It's a vector so shouldn't be used in if statement. what you need for y2 is index=y1>0 plot...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Help with while loop programming
Almost there! Give it a meaningful but not confusion variable name, and don't repeat the same calculation. %this function will ...

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
Negative memory usage?
According to the document ProcessMemUsage—The amount of memory consumed in each phase. Sum the ProcessMemUsage across all the p...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Storing Outputs of a two output function recursion
Yes. There is no limitation on the number of outputs for recursive function.

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Struct contents reference from a non-struct array object in yout.getElement
Like you said, In workspace yout is 7254x1 double, so you can't do vsignal= yout.getElement('VC_line'); You probably mixed up w...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to check memory occupancy of a Simulink Model?
No such capability as of R2019b. We've submitted similar requests to the Mathworks. There are something that might be helpful. ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
outputname of variable depending on inputname
utilize inputname()

plus de 6 ans il y a | 0

Réponse apportée
Signal Dimension Error WITHIN Default Simulink Cross Product Block
I ssume you didn't make any change to the "Add" block. Don't specify the size or dimension of your downstream signal (where the ...

plus de 6 ans il y a | 0

Réponse apportée
How can I convert a uint12 data to an int12 data in Simulink?
If you have the fixed point toolbox, then it is straightforward. Define your data types and then use them anywhere in Simulink,...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How would I rewrite this loop to work?
Hint: need to be "T=T+1;" To plot to a different figure, run figure() first.

plus de 6 ans il y a | 0

Réponse apportée
parse error message. "Parse error at '<='. usage might be invalid syntax"
Looks like it needs to be "while i<=3"

plus de 6 ans il y a | 0

Réponse apportée
Help With Nested IF Statements!!!
if T > 0 & T <= To needs to be if T(j) > 0 & T(j) <= To

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to use a Matlab script in a Simulink Matlab Function Block, that is calling Matlab Functions.
You can certainly do that. Just figure out the input/output of your script and make it the top-level function of your MATLAB Fun...

plus de 6 ans il y a | 0

Réponse apportée
find different combinations of splitting a vector
try nchoosek(V,1) nchoosek(V,2) % ... nchoosek(V,8)

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Limit range in Data properties of a Chart variable not working?
The Min/Max value in data property won't automatically saturate the actual value of your data. They are there for the purpose of...

plus de 6 ans il y a | 0

| A accepté

Charger plus