Beantwortet
How to take a max of a value in a struct
One way to do this PropertyNames={'Name','Weight','Strength'}; Data={'Metal',100,100; 'Plastic',50,50; 'Paper',1...

fast 6 Jahre vor | 0

Beantwortet
Variable names in array2table when creating table, "duplicate variable names" error
No way to know what is in "master". But there is a duplicated name in 'parameters'. The name 'TimeofSootSpikeEnd_sec' appeared t...

fast 6 Jahre vor | 0

Beantwortet
Combination of rows of two different matrices
Feels non-ideal. Any better solution? >> C=A(:,1)+B(:,1)'; D=A(:,2)+B(:,2)'; reshape([C(:),D(:)],[],2) ans = -1.0000 -...

fast 6 Jahre vor | 1

| akzeptiert

Beantwortet
Can the integration method be changed for discrete PI controller block from motor control blockset?
A DiscreteIntegrator block has that option. You just have to change it yourself if it is available. Of course then you will be d...

fast 6 Jahre vor | 0

Beantwortet
Double Pendulum Simulation using Simulink
The best way for this is to use the Constant block. You can specify the value of the Constant block as "m1" where "m1" is the va...

fast 6 Jahre vor | 1

Beantwortet
Different behaviour of hold on depending on order
Good catch! From the document of hold "If axes do not exist, then the hold command creates them." Without an existing axes, "h...

fast 6 Jahre vor | 0

Beantwortet
HOW TO INCREASE NUMBER OF PORTS IN SCOPE IN MATLAB (2007)
Probably don't have that capability. The current Scope block is originated in R2015b. What you can do is to use a Mux block to ...

fast 6 Jahre vor | 0

Beantwortet
Renaming files in a folder in bulk
>> name='AB007_group2_subject011_naive_day2_rawdata.mat' name = 'AB007_group2_subject011_naive_day2_rawdata.mat' >> name=...

fast 6 Jahre vor | 0

| akzeptiert

Beantwortet
how to save variables
xlswrite('MyFile.xlsx',[product, TIS, error, error2])

fast 6 Jahre vor | 0

| akzeptiert

Beantwortet
issue in find variable
floating point data precision issue. Below is an example, a and b are not equal even though all the visible digits are the same....

etwa 6 Jahre vor | 0

Beantwortet
How can i use If ... else loop inside function ?
If none of those conditions are met, you end up with z not assigned. give z a default value at the begining.

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Does your maintenance include security updates
Yes. Pay attention to the Bell icon on the top right corner of your MATLAB. There will be a reminder/notification when there is ...

etwa 6 Jahre vor | 0

Beantwortet
Setting initial condition of simulink integrator through code
The error message says you have the dialog window open and changes have not been applied. Click apply or Ok and then proceed.

etwa 6 Jahre vor | 0

Beantwortet
How to send a value to position "i" from app designer to a constant block in Simulink that has 5 dimmensions?
It certainly can be done but I am not sure if it would be "better". Note you have to set 'Value' as '5', not 5. when you set t...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Simulink, data from vector representation.
The most common case, let's say you have a vector a=0:0.1:1. Make it a column vector b=a' Create a time vector to specify the ...

etwa 6 Jahre vor | 0

Beantwortet
Changing function packaging of Simulink Functions to inlined
Inline would make that block a regular subsystem block, not a Simulink Function. A Simulink Function is called by its name, so I...

etwa 6 Jahre vor | 0

Beantwortet
Reactivate Matlab with different license
Most likely, you won't be able to launch MATLAB on your slower computer. Otherwise, you could go to Help, Licensing, Activate So...

etwa 6 Jahre vor | 0

Beantwortet
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses.
Add % before ... if you mean to add comment. "..." is used to continue another line, but your next line is new assignment.

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Why is cyclomatic Complexity of Switch Block 2?
A Switch block is an equivilant of an if-else statement. Its cyclomatic complexity number is 2.

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Increment and decrement counter
Use a 'Unit Delay' block. That is the counter. Add a number to it. The number is either 1 or -1. Use S-R Flip-Flop block to ge...

etwa 6 Jahre vor | 0

Beantwortet
finding elements in a vector from another vector
[~,y]=ismember(x,m)

etwa 6 Jahre vor | 0

Beantwortet
How to plot points and circles in the same image?
%% c=[0,0;-3 0;2 0]; r=[5;2;3]; viscircles(c,r); hold on; plot(10*rand(20,1)-5,10*rand(20,1)-5,'x');

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
changing mean and median
M=100; data=(1:M).'; MeanData=data; MedianData=data; for k=1:M MeanData(k)=mean(data(1:k)); MedianData(k)=median(data(1:...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Cannot get mod to return correct value
3^233 is an integer. Its value is roughly 1.5e111. So it needs 112 digits to record the integer value accurately. Double-precisi...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
I have problems with "To Workspace"
'out' is just the name of the structure that includes all the variables in all the "To Workspace" blocks. Your variable is in ou...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
Pre-Allocate structure with String / Datetime fields slows code down considerably
You are not using struct array. You are putting newdate (which is a datetime array) and full (which is a string array) into a st...

etwa 6 Jahre vor | 1

| akzeptiert

Beantwortet
Simulink slower to compile when 'SrcWorkspace' set to 'current' (call to sim a function)
Do you have an apple-to-apple fair comparison? Might it be that when you specify 'SrcWorkspace' as 'current' in runTest(), the d...

etwa 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to hold True value infinite
Connect this signal to the "S" (set) of a S-R Flip-Flop block.

etwa 6 Jahre vor | 0

Beantwortet
Sample Time Mismatch with S-Function of Same Sample Time?
When you create the S-function for that subsystem, check the input boundary signals and their sample time settings. Try use Inhe...

etwa 6 Jahre vor | 0

Beantwortet
Scripts works as main code but not as a function
call it this way [lamdaWC,lamdaWD,lamdaWF,lamdaWG] = noflow_boundary(lamdaO,Imax,Jmax);

etwa 6 Jahre vor | 0

| akzeptiert

Mehr laden