Answered
Is there a function to determine the non-exceedance probability of each value in the table?
You will first have to tell us the type of distribution the values are supposed to follow (e.g. log-normal distribution). After...

3 years ago | 0

Answered
How to have a function return a coordinate point?
[x,y] = unitCircle(pi/4) function [x y] = unitCircle(theta) z = [cos(theta),sin(theta)]; x = z(1); y = z(2); end

3 years ago | 0

| accepted

Answered
Is there something wrong with my anonymous function definition?
Fmincon expects fun1 to have one vector of length n of parameter values as input, not n scalar values as for your function fun1....

3 years ago | 0

| accepted

Answered
Numerical method of solving three unkown parameters
As far as I understand the article, the left-hand side of equation(18) is 0 at I = I_mpp, V = V_mpp according to equation (6). B...

3 years ago | 1

Answered
How can I overcome from this problem? any another method to solve this.
As long as you don't know the reason for the integration problem, you won't be able to overcome it. We can only refer to the di...

3 years ago | 0

| accepted

Answered
Integral from 0 to inf with imaginary numbers takes too long
It seems your integral does not exist. Note that by default, y is integrated with respect to x. I don't know if this is wanted ...

3 years ago | 0

Answered
trouble in make if statement simulation
Depends on what you want to achieve by the if-statement. You can either use if x(6)>0 && x(7)>0 H = 1; end to set H=1 i...

3 years ago | 0

| accepted

Answered
Wihle loop not running
At first (by your setting) v1 = 0. Thus the while loop is entered. After entering the while loop, v1 becomes x1 + y1 = [2 3 4 5...

3 years ago | 0

Answered
Calculate the difference between minimum values of a parabola and straight line (from a plot)
syms h V W S rho cd0 k cl Psl eqn = V == sqrt(2*W/rho/S/cl); cl = solve(eqn,cl); cd = cd0 + k * cl^2; D = 0.5 * rho * V * V ...

3 years ago | 1

Answered
I could'not understand why my plot doesnot show line?
plot(eta,f(2,:),'r') instead of plot(eta,f(2),'r')

3 years ago | 0

| accepted

Answered
Using a function and fsolve with a for loop
Look whether this might help. syms T x = sym('x',[1 4]); eqn1 = 10.*(T-x(1))+0.2.*(T.^4-x(1).^4) - x(4) == 0; eqn2 = -1.*(1/...

3 years ago | 0

Answered
Minimize a function with special constraints
Use "linprog". There are a lot of examples on how to use the solver under https://de.mathworks.com/help/optim/ug/linprog.html ...

3 years ago | 0

Answered
Use of fmincon to contain all data points with circle
rng("default") up_bound = 1000; x_r = -5 + (5+5)*rand(up_bound,2); tspan = [0 30]; f = @(t,y) [y(2);(1-y(1)^2)*y(2) - y(1)];...

3 years ago | 0

| accepted

Answered
taking the inverse of multiple matrix's
What am I doing wrong? Nothing. But some or all of the sigma matrices that you try to invert seem to be singular.

3 years ago | 0

| accepted

Answered
How to do the following two for loop?
You mean i=0.1:0.1:0.9 ; M = [i.',ones(numel(i),5)] ?

3 years ago | 0

| accepted

Answered
LINPROG requires the following inputs to be of data type double: 'f'.
y= readtable('y.crra.csv'); % 249 x 1 y=table2array(y); reg1=readtable('fitted.reg1.csv'); reg1=table2array(reg1); trareg1...

3 years ago | 0

| accepted

Answered
Undefined function or variable 'e'
@(x,y)exp(-(x.^2 +y.^2)).* (x.^2 +y.^2) instead of @(x,y)e^(-x.^2-y.^2)*(x.^2+y.^2)

3 years ago | 0

| accepted

Answered
Can't integrate function using Matlab
L_bar=25; sigma_d =[0.25, 0.5, 0.75, 1.0]; mu = log(L_bar) - 0.5*(sigma_d).^2; L_tilda = exp(mu); r = 0:100; for ii=1:nume...

3 years ago | 0

| accepted

Answered
Scaling of a system of coupled differential equation and is it possible?
If possible, use different units for physical parameters involved such that values like exp(-1.48e36*(x(1)^2)), exp(-6.0653e35*(...

3 years ago | 0

| accepted

Answered
Trouble superimposing two functions onto the same graph. One is correct, the other is incorrect.
y2 = cos(x)./(x.^2 + 1) - atan(x).*sin(x); instead of y2 = cos(x)/(x.^2 + 1) - atan(x).*sin(x); %% Define x variables x = ...

3 years ago | 1

| accepted

Answered
What does this script mean?
What is VN ? Where is the function "tauxZC2" ? As written, the code tries to find a value of x that minimizes (c/x*(1-1/(1+x)^t...

3 years ago | 0

| accepted

Answered
How to solve a non-linear optimization problem with matrix and vector decision variables?
I turned deltaB into a diagonal matrix. I changed m to 130 and it works. Are you sure a solution exists for m = 120 ? %% Input...

3 years ago | 1

| accepted

Answered
Issue with probability density function
histogram(Output,'Normalization', 'pdf');

3 years ago | 0

Answered
Hi, I would need the algebraicly solved two equations for X and Y of the intersection points of two circles to write them as algorithms in a graphics language. Thanks
syms x y x1 y1 x2 y2 r1 r2 real eqn1 = (x-x1)^2+(y-y1)^2==r1^2; eqn2 = (x-x2)^2+(y-y2)^2==r2^2; sol = solve([eqn1,eqn2],[x y]...

3 years ago | 0

Answered
Code for the Maximum likelihood esitmate for the gamma distribution , both parameters unknown
format long data = [27,82,115,126,155,161,243,294,340,384,457,680,855,877,974,1193,1340,1884,2558,15743]; p = mle(data,'Distri...

3 years ago | 0

Answered
2nd order differential equation
Use MATLAB's "pdepe" with m = 2 (radial coordinates).

3 years ago | 0

Answered
solve ODE using finite difference method
This is a PDE, not an ODE. Use "pdepe" to solve.

3 years ago | 0

Answered
Unable to meet integration tolerances without reducing the step size problem.
You define an initial condition for x(1) as 0, but you divide by x(1) in equations 1 and 2. This won't work.

4 years ago | 1

Answered
coupled ode for 2nd order
I didn't compare equations and boundary conditions with those listed above. % Defining parameters delta = 0.02; % L...

4 years ago | 1

Load more