Answered
Array indices must be positive integers or logical values.
e = exp(-SNR_index.^2./2) SNR_index is undefined. compute_the_Q = integral(@(SNR_index) (1/sqrt(2*pi)).*e, SNR_index,Inf,'Arra...

4 years ago | 0

Answered
How can I simulate Buffon's needle on MATLAB?
https://simonensemble.github.io/2018-04/buffon

4 years ago | 0

| accepted

Answered
Solve Three non-linear equations for 3 variables system
You might want to try a numerical solver, but the two I tested also didn't succeed. fun = @(A,B,C)[72000-(B*4000)/(log(A*4000)-...

4 years ago | 0

Answered
Coupled ODE using ODE15s with multiple outputs
When communicating with ODE15S, the solution must be treated as one vector of size 200, not as two vectors of size 100. E.g. f...

4 years ago | 0

| accepted

Answered
Is it possible to (non-linear) minimize x^y by choosing both x and y?
fun = @(x) x(1)^sqrt(x(2)); lb = [1.01,1.01]; ub = [100,2]; x0 = [1.01,1.01]; sol = fmincon(fun,x0,[],[],[],[],lb,ub,@nonlco...

4 years ago | 0

Answered
What is wrong in script?
I would have progrmmed it this way, but the result seems to be the same. My guess is that there is a mathematical trick to extr...

4 years ago | 0

Answered
How to generate plot
a = 5; n = 30; P0 = 100; c = 3; s = cos((2*(1:n)-1)*pi/(2*n)); x = a*s; P = P0*exp(-0.5*(x/c).^2).*(1-x/c).^2; K1 = sqrt(...

4 years ago | 1

Answered
What is an efficient way of finding the maximum value under a certain limit?
A = [1,2,3;4,5,6;7,8,9]; A(A>=8) = -Inf [m,i] = max(A,[],'All') [row,col] = ind2sub(size(A),i)

4 years ago | 1

| accepted

Answered
How I can give condition & plot the solution of this differential equation. . . . . . . Please Guide
dsolve doesn't succeed. Thus use a numerical solver (bvp4c) to solve your equation. syms A theta(z) dtheta=diff(theta,z) d...

4 years ago | 0

Answered
diffusion from point source boundary conditions
if i use the "s" variable for the solver, does this input it at r=0, or for every value of r? For every value of r (at least if...

4 years ago | 1

| accepted

Answered
Arrays have incompatible sizes for this operation.
This line of code is giving me vector of a length of 214. If dt1 correspond to Fc values half hour and you want the maximum Fc ...

4 years ago | 0

Answered
is the "for loop" is wrong? what can be the solution?
ti = 0; tf = 100E-4; tspan=[ti tf]; o = 1E6; tc = 70E-9; tf = 240E-6; a1 = 0.02; a2 = 0.02; P1 = 1; P2 = 1; k = ...

4 years ago | 0

Answered
Ordinary differential equation, transforming into a single ODE
beta = 0.21; mu = 0.29; omega = 1; v0 = 1.0; vdp1 = @(t,y)[y(2);-beta*y(2)+(1+mu*cos(omega*t))*y(1)-y(1)^3]; [t,y] = ode45...

4 years ago | 0

Answered
How to prevent warning when running fplot of a function containing bessel functions?
O is only determined up to a constant. You must fix this constant of integration to get reasonable results (I assumed O(1e-8) = ...

4 years ago | 0

| accepted

Answered
Using Multistart in an unconstrained optimization
D = [1.00 0.00 1.01 0.03 1.12 0.14 1.24 0.23 1.39 0.32 1.61 0.41 1.89 0.50 2.17 0.58 2.4...

4 years ago | 0

Answered
Why am I not getting desired values using loop?
br_peaks = [1 2 3 4 5 6 7]; lbr = numel(br_peaks); points = repmat(br_peaks,lbr,1); for iii = 1:lbr for jj = max(1,iii-3...

4 years ago | 0

Answered
how to use for loop to get a value of y at different time?
The requirement that you can evaluate Y for different values of t is that you get a solution for Y from your code. I don't get a...

4 years ago | 0

| accepted

Answered
Plotting function with differenting constant
Include the command hold on after the line fplot(y{i}); such that preceeding graphs are not overwritten.

4 years ago | 0

Answered
how to solve integral in the defining the function command?
integral_{0}^(t) I(phi) dphi = normcdf(t,0,0.1) - 0.5 So you can work with y(1) = normcdf(t,0,0.1) - 0.5 in your equations.

4 years ago | 0

Answered
I want to find the best coefficients for curve fitting for my experiment data
Your code ? Essential in your case is a good starting guess for the parameters. Try the following code and take the coefficien...

4 years ago | 0

Answered
How to find empirical and estimated (Weibull) probability density
https://de.mathworks.com/help/stats/histfit.html

4 years ago | 0

Answered
Add equations to my polynomial fit on the graph
x=linspace(0.1,0.5,5); y=[32.2,36.1,42.2,65.67,67.3]; plot(x,y,'.',MarkerSize=15) hold on % Fit line to data using polyfit ...

4 years ago | 0

Answered
Is there a function that transforms a symmetric matrix into a diagonal of Eigenvalues with transforms on either side?
If this is not what you want, please tell us what you want. A = [3 7;7 4]; [V,D] = eig(A) V*D*V.'

4 years ago | 2

Answered
How can I find the magnitude of a vector B when I know the unit vector B, the vector A and the result cross product of AXB?
Calculate A x B_unit Then the magnitude of B is m = norm(A x B)/norm(A x B_unit) where B_unit is the unit vector in the d...

4 years ago | 1

| accepted

Answered
How i can find the difference between 2 values.
T1=[1.5 2.5 3.5 4.5]; T2=[1.2 2 3 4]; Difference = T1 - T2

4 years ago | 0

Answered
Colebrook equation and approximation
Part a) γ = − (1/√0.25) log10( e/7.4R + 5.7/Re^0.9) Part b) v = vmax(1 − r/R)^1/γ ; plot(r,v) What's the problem ? You already...

4 years ago | 0

Answered
How can I retrieve dY when using ode15i
sol = ode15i(@f,tspan,y0,yp0); [Y,dY] = deval(sol,tspan); plot(tspan,dY(:,2))

4 years ago | 0

| accepted

Answered
value transform by for loop
Floating point arithmetic. To check for equality (==) always gives problems. Take a look at https://de.mathworks.com/help/matl...

4 years ago | 0

Answered
solving a coupled system of differential equations
Can you solve a + b = 2*x_dot*z_dot 3*a + b = -3*x*z for a and b ? Once you've done this, your system can be written as x...

4 years ago | 0

| accepted

Load more