Respondida
Why do I keep getting "no solution found" message?
Maybe a better code structure to debug the values "fsolve" gets from "sigmagap". You think that you know that "sigmagap" return...

casi 4 años hace | 0

Respondida
How can one calculate Differentiation of matrix array with time as first column and data as second column ?
B = [A(:,1),gradient(A(:,2))./gradient(A(:,1)); plot(B(:,1),B(:,2))

casi 4 años hace | 0

Respondida
How to select rows from an array?
B = [A(2,:);A(4,:);A(6,:)] or if you want the rows one by one: A2 = A(2,:); A4 = A(4,:); A6 = A(6,:);

casi 4 años hace | 0

Respondida
I get an error when I try to run my logistic regression.
theta is not initialized - thus the theta(i) at the right-hand side of the assignment theta(i) = theta(i) - (alpha/m) * sum(er...

casi 4 años hace | 0

Respondida
Curve fitting equation does not give the input z back
@Olaf Schipper Did you read that you have to use the normalized values for pA and T to evaluate mu(pA,T) ? f(x,y) = p00 + p10*...

casi 4 años hace | 1

| aceptada

Respondida
calculate coefficients with linear regression
A = [ones(numel(xj),1),xj,xj.^2,exp(xj)]; b = yj; sol = A\b; a0 = sol(1) a1 = sol(2) a2 = sol(3) a3 = sol(4) where xj and...

casi 4 años hace | 0

| aceptada

Respondida
How to set a RAM limit, so that if it gets passed, the simulation gets killed?
https://de.mathworks.com/matlabcentral/answers/34923-limiting-matlab-memory-usage

casi 4 años hace | 0

Respondida
L’Hospital’s rule
syms x a=x+2; b=x^2+3*x+2; c=a/b; limit(c,-2)

casi 4 años hace | 1

| aceptada

Respondida
i want to solve a 297 linear equations with 298 unknown variables
My guess is that your equations are linear in the unknowns. If this is the case, try https://de.mathworks.com/help/symbolic/sym...

casi 4 años hace | 0

Respondida
Finding the sum to n of 1/2^n
format long n = 1:20; b = 1./2.^n; Sn = sum(b)

casi 4 años hace | 0

Respondida
Euler method with tabular inputs and multiple ODE's
The best way to refer to time-dependent data vectors in integration problems is to use "interp1". In your case above, e.g., de...

casi 4 años hace | 1

Respondida
How to use ODE4 to solve second order ODE
ode4 works with 1st order systems of ODEs. Yours is a 2nd order equation. Can you write your equation as a system of two first...

casi 4 años hace | 0

Respondida
Find maximum of quadratically constrained quadratic problem using MATLAB
Is this the simplified version of the problem you are trying to solve ? It seems fmincon gives the correct solution. N = 4; h...

casi 4 años hace | 0

| aceptada

Respondida
Reference for the optimizePath function?
https://de.mathworks.com/help/pdf_doc/nav/index.html

casi 4 años hace | 0

| aceptada

Respondida
Reference for the optimizePath function?
https://de.mathworks.com/help/pdf_doc/nav/index.html

casi 4 años hace | 0

Respondida
how to solve logarithm equation
log10(4*x)-log10(3*x) = log10((4*x)/(3*x)) = log10(4/3) log10(5*x)-log10(2*x) = log10((5*x)/(2*x)) = log10(5/2) So you try to ...

casi 4 años hace | 0

Respondida
Unrecognized function or variable 'ode4'.
Look below at how k_1,...,k_4 must be computed in the case that your ODE function only depends on t, not y. The classical Runge...

casi 4 años hace | 1

Respondida
Can I use mvncdf for Y=P[V(1)<XU(1), XL(2)<=V(2)<=XU(2)]?
You set XL(i) = -Inf. What's the problem ? xl(1) = -Inf; xu(1) = 0; xl(2) = -5; xu(2) = -2; mu = [0 0]; sigma = [1 0;0 1...

casi 4 años hace | 0

Respondida
Faster implementation of laguerreL
Maybe len = 1:100; [I,J] = meshgrid(len,len); output = laguerreL(I,J,2)

casi 4 años hace | 1

Respondida
Matrix column selection based on vector with indices
k=ones(6,4); v=randi(size(k,2),1,size(k,1)); v(end) = 0 idx = find(v>0) k(sub2ind(size(k),idx,v(idx))) = 0

casi 4 años hace | 0

| aceptada

Respondida
finding a function with 4 variables
I suggest you start with height = a + b * sugar + c * yeast + d * flour If height,sugar, yeast and flour are column vectors of...

casi 4 años hace | 1

| aceptada

Respondida
compact way to calculate euclidean distance among points
% x_a, y_a a = [0,0]; % x_b, y_b b = [0,1; 2,1; 1,1; 1,3]; D = pdist2(a,b)

casi 4 años hace | 0

| aceptada

Respondida
For loop skipping with if statement
The usual average would be pk(a,2) = ( pk(a-1,2)*(pk(a,1)-pk(a-1,1)) + pk(a+1,2)*(pk(a+1,1)-pk(a,1)) )/(pk(a+1,1)-pk(a-1,1)) ...

casi 4 años hace | 0

Respondida
Anyone know how to solve 2*x^2+2*y^2=5, x*y=1 without using command syms?
x = roots([2 0 -5 0 2]) y = 1./x res1 = 2*x.^2+2*y.^2-5 res2 = x.*y-1

casi 4 años hace | 1

| aceptada

Respondida
May I ask what MATLAB code for expected value is by fitting a Poisson distribution?
A = 1:100; lambdahat = poissfit(A)

casi 4 años hace | 0

| aceptada

Respondida
Linear Fitting starting from a value
Sure. Use l(x) = a*x + 100 as model function and fit the parameter a. xdata = ...; % your xdata as column vector ydata = ...

casi 4 años hace | 0

| aceptada

Respondida
how to fill a matrix without using loop in matlab?
If you want to plot the partial sums of the Fourier series, you will have to keep the last loop, I guess. close all; clear; clc...

casi 4 años hace | 0

Respondida
How to plot the variations for integrating parameter
Note that integral(H2Ox, 183000, Inf) = Inf !! H2Ox = @(EA) -0.0023*(-8/(48000^8))*(EA-183000).^7; H2Oz = @(y) integral(H2Ox, ...

casi 4 años hace | 0

| aceptada

Respondida
Solve the complex equations
syms x real syms y real a=2*(x+y*j)==6-3j; sol = solve(a,[x,y]); sol.x sol.y

casi 4 años hace | 0

| aceptada

Respondida
I would like to make surface plot of my probability of failure curve?
clear all; mue=0.82; %mean of unbiased factor of study case sige=0.189; %SD of unb...

casi 4 años hace | 0

| aceptada

Cargar más