Answered
polyfit error first two inputs must have the same number of elements.
You create a vector x . Then for the function values, you compute temp = sqrt(1/(1+x.^2)) However, here x is the entire vector...

6 days ago | 0

Answered
Execute parfor iterations in order!
This is not possible with parfor(), and it is unlikely that Mathworks will ever implement an option to support this. parfor div...

6 days ago | 2

| accepted

Answered
Code generation information file does not exist Problem
Notice this part: "C:/ProgramData/MATLAB/SupportPackages/R2021a/aIDE/hardware/tools/avr/bin/avr-gcc" -std=gnu11 -c -w -ffunctio...

6 days ago | 0

Answered
Strange phenomenon when running FFT on GP
http://acarus.uson.mx/docs/cuda-5.5/CUFFT_Library.pdf "CUFFT provides a simple configuration mechanism called a plan that pre-...

6 days ago | 0

Answered
physical exponential decay and growth processes
You have two changing variables: t and tau. And you are calculating N using changes in tau, but plotting over changes in t. If...

6 days ago | 0

| accepted

Answered
PLOTTING BAR GRAPHS with different colors
N = 10; bar(x(1:N), y(1:N), 'r'); hold on bar(x(N+1:end), y(N+1:end), 'b'); hold off

7 days ago | 0

Answered
Can a solution from dsolve be used to feed equations for another instance of dsolve?
syms N1(t) N2(t) N3(t) N4(t) N5(t) N6(t) l1 l2 l3 l4 l5 l6 r34 r35 N0; % decay of U-238 to formation/decay of Pa-234m equations...

7 days ago | 0

Answered
Random Walk Problem (Plots)
numberOfSteps = 40000; % Totlal number of steps x(1) = 0.0; % Initial position (x) y(1) = 0.0; % Initial position (y) for i...

7 days ago | 0

| accepted

Answered
Indexing a sub-variable in Matlab base workspace
[y(i).Cost, y(i).Sol] = CostFunction(particles(i,:); [ymin, index] = min([y.Cost]);

7 days ago | 0

| accepted

Answered
How to create a diagonal matrix that starts at (1,1)?
n = 4; lambda = 0.2; A = diag(repmat(lambda, 1, n), 1)

7 days ago | 0

Answered
What is the mistake which I did in this Breast cancer detection codes especially on segmentation part ?
In a couple of places, you end the indexing too early -- A((i)),((j)) where you should have had A((i),(j)) Cleaned up version o...

7 days ago | 0

Answered
how i can solve E.D for beloww eq. by using fmincon
C1 = @(x) 459+6.48*X(1)+0.00128*X(1)^2 C2 = @(x) 310+7.85*X(2)+0.00194*X(2)^2 C3 = @(x) 78+7.97*X(3)+0.00482*X(3)^2 C = @(x) ...

7 days ago | 0

| accepted

Answered
how to build a control system with one input and multiple outputs
https://www.mathworks.com/help/simulink/ug/creating-subsystems.html#mw_d29b9e44-2c05-4782-a3b1-475fba783dd1 Create Subsystem, ...

7 days ago | 0

Answered
Trying to solve for analysis of system stability with transfer functions where 1 + Gol = 0, x represents the S variable. It says "unable to find explicit solution".
format long g syms x Gd = 1/((573.5*x)+1); Gc = (1.09)*(1+((1/693.51*x))); Gv = (0.020*(exp(-24*x))/((180*x)+1)); Gp = 1417...

7 days ago | 0

Answered
about python code to matlab code
for i = 1 : Lx X = fsolve(@(x)equations(x,new_Lx), [1,1,1,1]); a = X(1); b = X(2); c = X(3); d = X(4); end

8 days ago | 0

| accepted

Answered
is there a function that receives 3 coordinates in X-Y as a matrix and calculates its Area and environment ?
https://www.mathworks.com/help/matlab/ref/boundary.html If you use the second output of boundary() then it will return the are...

8 days ago | 0

Answered
Update data from Google Sheets to MATLAB continuously
When I look at the code at https://www.mathworks.com/matlabcentral/fileexchange/39915-getgooglespreadsheet it looks to me as if ...

8 days ago | 1

Answered
Enormous array of zeros exceeds maximum array size preference.
https://www.mathworks.com/matlabcentral/fileexchange/29832-n-dimensional-sparse-arrays

8 days ago | 0

| accepted

Answered
how ca I install MATLAB on windows 7, 32 bit ?
You would need to install R2015b or earlier. It is an open question as to whether Mathworks would ever release another 32 bit...

8 days ago | 1

Answered
Solving a large number (thousands) of different "Ax=b" equations when the matrices A are all the same small size (3x3 to 6x6), but different numbers.
Solutions up to 6 x 6 are feasible to calculate analytically. a = sym('a', [6 6]); B = sym('B', [6 1]); tic; sol6 = a\B; time...

8 days ago | 0

Answered
Switching from Vensim to Matlab and looking for recommendations
That sounds much like what you can do with SimBiology

8 days ago | 2

Answered
Ho we can Implement Unary compression method and create Unary encoder decoder in matlab?
Mathematically, you can consider a file of bytes to be a Base 256 encoding of an integer. For example if the file contained just...

8 days ago | 1

| accepted

Answered
Help with RC5 algorithm
Under international law, encryption is legally considered a weapon of war, and so is restricted. Different countries have dif...

8 days ago | 0

Answered
how can i plot unit step function
You can use the symbolic toolbox heaviside() function after having set sympref('heavisideatorigin') according to the value you w...

9 days ago | 0

| accepted

Answered
code of z transform for kroneckerDelta
kroneckerDelta() was added in R2014b. You will need to do one of the following: * write your own version of kroneckerDelta *...

9 days ago | 0

Answered
how can i use ilaplace
No, you are incorrect. The answer you show is not ilaplace(2*s - 1/s^2 + 4) and is instead ilaplace((2*s-1)/(s^2 ...

9 days ago | 0

| accepted

Answered
MATLAB libraries of DHT11 sensor
No, there is no MATLAB library for that. However if you are using Simulink, see https://www.mathworks.com/matlabcentral/fileexc...

9 days ago | 0

Answered
Using symbolic integration: Why does my double integral returns different numerical values depending on integration order?
syms x y fun1 = @(x, y) (112).*exp(-7.*x-9.*y); int(fun1, y, 1/4) Which variable did it integrate with respect to? An...

9 days ago | 2

Answered
loop for subtracting values
data1 = Dasdata.Strain(channels,1)'; for i = 2:53 data2 = Dasdata.Strain(channels,i); y = data2-data1; plot(y, '...

10 days ago | 0

Answered
Index in position 3 exceeds array bounds. (Must not exceed 1).
You have a lot of confusion about whether you are dealing with arrays or scalars. Your triple loop structure is the kind of codi...

10 days ago | 1

Load more