Risposto
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 -...

quasi 6 anni fa | 1

| accettato

Risposto
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...

quasi 6 anni fa | 0

Risposto
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...

quasi 6 anni fa | 1

Risposto
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...

quasi 6 anni fa | 0

Risposto
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 ...

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

| accettato

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

quasi 6 anni fa | 0

| accettato

Risposto
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....

quasi 6 anni fa | 0

Risposto
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.

quasi 6 anni fa | 0

| accettato

Risposto
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 ...

quasi 6 anni fa | 0

Risposto
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.

quasi 6 anni fa | 0

Risposto
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...

quasi 6 anni fa | 0

| accettato

Risposto
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 ...

quasi 6 anni fa | 0

Risposto
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...

quasi 6 anni fa | 0

Risposto
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...

quasi 6 anni fa | 0

Risposto
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.

quasi 6 anni fa | 1

| accettato

Risposto
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.

quasi 6 anni fa | 1

| accettato

Risposto
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...

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

Risposto
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');

quasi 6 anni fa | 1

| accettato

Risposto
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:...

quasi 6 anni fa | 0

| accettato

Risposto
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...

quasi 6 anni fa | 0

| accettato

Risposto
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...

quasi 6 anni fa | 0

| accettato

Risposto
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...

quasi 6 anni fa | 1

| accettato

Risposto
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...

quasi 6 anni fa | 0

| accettato

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

quasi 6 anni fa | 0

Risposto
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...

quasi 6 anni fa | 0

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

quasi 6 anni fa | 0

| accettato

Risposto
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

quasi 6 anni fa | 0

| accettato

Risposto
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 ...

quasi 6 anni fa | 0

| accettato

Carica altro