Réponse apportée
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 -...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 1

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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 ...

presque 6 ans il y a | 0

Réponse apportée
Renaming files in a folder in bulk
>> name='AB007_group2_subject011_naive_day2_rawdata.mat' name = 'AB007_group2_subject011_naive_day2_rawdata.mat' >> name=...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
how to save variables
xlswrite('MyFile.xlsx',[product, TIS, error, error2])

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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....

presque 6 ans il y a | 0

Réponse apportée
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.

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 0

Réponse apportée
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.

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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.

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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.

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
finding elements in a vector from another vector
[~,y]=ismember(x,m)

presque 6 ans il y a | 0

Réponse apportée
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');

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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:...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

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

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

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

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Using the enter key to input multiple values for one variable
outAccel=zeros(4,1) for k=1:4 outAccel(k)=input('What are your accel value/'); end

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Insert gain as vector
Use a "From Workspace" block to import the gain value as a dynamic signal, specify the data =[1 0.1; 2 0.2; 3 0.3] and then you ...

presque 6 ans il y a | 0

| A accepté

Charger plus