Answered
Plot 3D of coinstraned optimization
x=-2:0.01:2; y=-2:0.01:2; [X,Y] = meshgrid(x,y); Z = X.^2-2*X+1+Y.^2; xx=-1:0.01:1; yy=-1:0.01:1; y1 = (1-xx.^4).^(0.25)...

4 years ago | 2

Answered
how to write zeta in matlab
https://de.mathworks.com/help/matlab/creating_plots/greek-letters-and-special-characters-in-graph-text.html

4 years ago | 0

Answered
Minimize a function using gradient descent
X = -2:0.1:2; Y = -2:0.1:2; [X,Y] = meshgrid(X,Y); Z = 2*X.^2+3*Y.^2; surf(X,Y,Z) hold on x(1) = 2; % initial value of x ...

4 years ago | 1

| accepted

Answered
how to plot ellipse around poincare map of RR intervals
Try https://de.mathworks.com/matlabcentral/fileexchange/9542-minimum-volume-enclosing-ellipsoid on your point sets.

4 years ago | 0

Answered
Plot does not appear.
E1=1:73 W=15; L=1.3; w=0.25; h=0.075; I=(w*h^3)/12; Deflection5 = (W.*L.^3)./(3.*E1.*I) plot(E1,Deflection5)

4 years ago | 0

| accepted

Answered
How can i use elements with equal indexes?
Put "-M" in the matrix of inequality constraints where x_jj is addressed and "+1" where y(j) is addressed. Then you have set th...

4 years ago | 0

Answered
Plotting Gradient of a 3-variable Function
Depends on what you want to plot. In each point (x,y,z), the gradient g=(gx,gy,gz) is a 3d-vector associated with this point....

4 years ago | 0

Answered
how do i print my conversion code?
cube = @(n)prod((1:n)/n); n = 1:1000; series_terms = arrayfun(cube,n); series_values = cumsum(array); series_values = series...

4 years ago | 0

Answered
how do i fix this code? (finding convergence of divergence)
cube = @(n)prod((1:n)/n);

4 years ago | 0

| accepted

Answered
Stuck at coding modified Newton-Rapson function
Why do you call it "Modified Newton-Raphson" ? I do not quite understand what the two lines mul=subs(func,xr)/subs(diff(func)...

4 years ago | 0

| accepted

Answered
Array multiplication returning single value
Specs ~ n x 7 A1Temp ~ 1 x 7 A2Temp ~ 7 x n A3Temp ~ 1 x n AResult ~ 1 x 1

4 years ago | 0

Answered
Nonscalar arrays of function handles are not allowed; use cell arrays instead.
syms o p fun1 = o+p; fun2 = o*p+5; fun = [fun1,fun2]; eq = matlabFunction(fun); bbb = fsolve(@(x)eq(x(1),x(2)),[0,1]);

4 years ago | 0

Answered
Shifting Bivariate Distribution to a New Center
mu = [2 2]; instead of mu = [0 0];

4 years ago | 0

| accepted

Answered
errors in lsqnonlin fittings for models of different components
The code you supplied is not the code which caused the error message. The error message is caused by a line F(1:lx)=real(Fcmpx...

4 years ago | 0

Answered
a function that has two inputs: a number and a row vector
scalar = 6.0; vector = [3 5 8]; output = input(scalar,vector) function output = input(scalar,vector) output = scalar*vec...

4 years ago | 0

Answered
divide each column of an array by its norm of the column
A = A./vecnorm(A,2)

4 years ago | 1

| accepted

Answered
how to write this code ?
What is the code supposed to do with the three V-values ? You can write syms V_ab V_bc V_ca eqn = V_ab + V_bc + V_ca == 0 re...

4 years ago | 0

Answered
obvious error in differentiation
Did you try pretty(h1) and/or isequal(h1,h2) ( I named the second term h2 ) ? I think they are equal - at least in h1 you c...

4 years ago | 0

| accepted

Answered
How to take integral of an equation?
Your code is chaotic, so I don't know exactly what you are trying to do. Make the best of this: R=0.56225; R0 = 0.1; delta_R...

4 years ago | 0

| accepted

Answered
Can't get Newton Rapshon implicit Euler method to work
g should be g =@(z) z-z1-h*f(t0+h,z) with Jacobian jg = eye(2)-h*jf

4 years ago | 1

| accepted

Answered
Why is my plot blank?
data = readtable('clcd.xlsx'); Alpha =(data{:,1}); % Angle of Attack (deg.) CL = (data{:,2}); % Lift Coefficient CD = (data{:...

4 years ago | 0

Answered
Empty Sym 0-by-1
If you print out "du", you will see that it has no zero (the numerator does not depend on u): du = (sym) ...

4 years ago | 0

Answered
Trouble using a for loop and using indexes properly - why am I getting "Index exceeds the number of array elements (1)" as an error?
Is it this what you want ? e = 100:100:100000; for i = 1:numel(e) E = e(i); epsilon = 0.03255/(Z1*Z2*((Z1^2/3)+(Z2^2...

4 years ago | 0

| accepted

Answered
Editing a function and then using fzero
%variables u0 = 4*pi*10e-7; Ms = 0.8; gamma = 1; Ku=1; D = 0; A = 1; sinfei = sin(-pi/2); delta=1; syms d W for m = 1:...

4 years ago | 0

| accepted

Answered
how can I solve this non linear partial differential equation mentioned below I have some initial & boundary condition
Discretize the differential operators, include the boundary conditions and solve the resulting system of nonlinear equations for...

4 years ago | 0

Answered
Solving Constrained Optimization for 4 variables (or 3?)
It's a simple linear optimization problem. If you are allowed to, use "linprog" to solve. f = [1; 1; 1; 0]; Aeq = [3 1 0 -1;1 ...

4 years ago | 1

Answered
Solving a set of simultaneous equations
a = 0.5; fun =@(x1,x2,x3,x4) [x1^2 + a*x1*x2 + a*x1*x3 + a*x1*x4 - 30^2;... a*x2*x1 + x2^2 + a*x2*x3 + a*...

4 years ago | 1

| accepted

Answered
How to customize a complex differentiated equation?
The term is 0 if r^2+e3*G*H**x^4e2-f^3*b = 0. Can you solve for x ?

4 years ago | 0

Load more