Beantwortet
Trying to store data
fores(i,:)= "fores" has three dimension, thus fores(i,i,:) ? I don't know where you want to save what and if the dimensions fit...

fast 4 Jahre vor | 0

Beantwortet
How would you make these for loops dynamically recursive?
Code available under https://de.mathworks.com/matlabcentral/fileexchange/7147-permn It's brute-force - thus caution: quite mem...

fast 4 Jahre vor | 0

Beantwortet
Fitting a data with the best fit
Try "fit" with fitType gaussEqn = 'a*exp(-((x-b)/c)^2)+d' https://de.mathworks.com/help/curvefit/fit.html#d124e31956

fast 4 Jahre vor | 0

Beantwortet
Different results using curve fitting app
Scale your problem: x = [262088, 323208, 390728, 464648, 544968, 631688]; y = [0.629, 0.64, 0.93, 0.972, 1.355, 1.56]; xscale...

fast 4 Jahre vor | 1

Beantwortet
Obtain imaginary numbers in for loop but running code at each step on its own produces absolute numbers
diff = (1-(3.*((1-x(i)).^(2/3)))+(2.*(1-x(i)))) reac = (1-((1-x(i)).^(1/3))) instead of diff = (1-(3.*((1-x).^(2/3)))+(2.*(1-...

fast 4 Jahre vor | 0

Beantwortet
Matlab plot not showing correct values
v(i)=0.1553567*(i.^6)-2.0416*(i.^5)+9.1837*(i.^4)-14.829*(i.^3)-1.3703*(i.^2)+32.821*(i)-1.3155 instead of v=0.1553567*(i.^6)-...

fast 4 Jahre vor | 0

Beantwortet
how to plot a periodic function fro negative to positive?
T = pi; % period x = -10:0.1:10; % lets say your original function is y=2*x which repeated every T second, then y = 2*(mod(x-...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Not enough input arguments for my ode15s solver
options = odeset('Mass',E); E is not defined. x0 = [0; x0b ; 0]; x0b is not defined. [tout,xout] = ode15s(prime,tspan,x0,opt...

fast 4 Jahre vor | 0

Beantwortet
How can I build a objective function for a three phase induction motor?
Fobjt = sum((I1-I1est)./I1).^2+((eff-effest)./N1).^2+((fp-fpest)./fp).^2+((I0-I0est)./I0).^2,'All')

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to creat a loop to repeat the code with +1 to the input until the condition is met?
N=1728; sumcands = 0; while sumcands ~=4 N = N+1; b= [1:N^(1/3)]; c = nthroot(N-b.^(3),3); digits=10; ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Combining elements from two arrays
A = [0.9572 0.1419 0.7922 0.4854 0.4218 0.9595 0.8003 0.9157 0.6557]; B = [0.8147 0.6324 0.95...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to add "erf()" part to the ode solution?
syms x y(x) eqn = diff(y,x) - (-x+2+10*exp(-10*(x-1)^2)) == 0; cond = y(0)==1; sol = dsolve(eqn,cond) fplot(sol,[0 6])

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
How can I select specific rows from a matrix when those row numbers are identified by another matrix?
If the row numbers in Matrix2 are already sorted: Matrix3 = Matrix1(Matrix2,:) Else sort them first.

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to plot a math function with a vector
Then maybe T_j_scalar_t = @(t) integral(@(tau) P(tau) .* dZ_th(t - tau), 0, t); T_j = arrayfun(@(t)T_j_scalar_t(t), cooling_ti...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to fit a smooth curve on discrete data.
Maybe something like this: x = [3, 2.5, 2, 1.5, 1, 0.5]; y = [1.8, 1.75, 1.71, 1.55, 0.8, 1.25]; plot(x,y) xx = linspace(x(1...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Using ODE Event locations: how to implement more than one event with different following solver decisions?
sol.ie as return parameter from the solver indicates which of the events you defined became active. According to this value, the...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I solve a Lagrange equation?
syms x1 x2 x3 lambda g = x1+x2+x3 - 10; L = 12*x1-x1^2+8*x2-x2^2+18*x3-3*x3^2+lambda*g; Lx1 = diff(L,x1); Lx2 = diff(L,x2); ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to plot function f(x,y,z)=c ?
c = pi/2; f = @(x,y,z) cos(x) + cos(y) + cos(z) - c fimplicit3(f,[-pi pi -pi pi -pi pi])

fast 4 Jahre vor | 1

Beantwortet
Curve fit but only for the values that exists with defined values of x.
load census I = cdate >= 1850 & cdate <= 1950; cdate1 = cdate(I); pop1 = pop(I); plot(cdate,pop,'o') %Create a fit option...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to find the timestep in ode45?
p(t) represents injection into the body at a rate of 2mg/min. So p(t) depends on the difference between the current and previo...

fast 4 Jahre vor | 0

Beantwortet
error in fminbnd and in my live function
Don't you have to include the circular area G = pi*r^2 at the bottom ? Then add pi*r^2 to A as indicated below. V = 10; % c...

fast 4 Jahre vor | 0

Beantwortet
Solving a PDE symbolically
First check whether (dH/dx1,dH/dx2) is conservative. Then you can reconstruct H by using H(x1,x2) = H(x10,x20) + integral_{z=x...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Not sure how to go farther with this problem.
n = 8; TD = zeros(n); for row = 2 : n-1 TD(row,(row-1):(row+1)) = (row-1):(row+1); end TD You will have to add the set...

fast 4 Jahre vor | 1

Beantwortet
how to plot the gradient of a equation having specific region?
x = -2:0.1:2; y = x; [X,Y] = meshgrid(x,y); f = @(x,y) -15*x.^2+4*y; surf(X,Y,f(X,Y))

fast 4 Jahre vor | 0

Beantwortet
Differential equation not working
I = @(t)100*sin(2*pi*t);; dIdt = @(t) 2*pi*100*cos(2*pi*t); V0 = 0.1; fun = @(t,V,I,dIdt) V/I(t)*dIdt(t)-V/0.01*(V*I(t)/250-1...

fast 4 Jahre vor | 0

Beantwortet
what is the problem of my code doing inverse Poisson cumulative distribution?
lambda = 10; u = 0.6; m = iPoisson(lambda,u) m1 = icdf('Poisson',u,lambda) function m = iPoisson(lambda,u) if u == 1 ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
2D Finite Difference Method
K_11 = (f1(a(1,i)+h,a(2,i))- f1(a(1,i)-h,a(2,i)))/(2*h); K_22 = (f2(a(1,i),a(2,i)+h)- f2(a(1,i),a(2,i)-h))/(2*h); K_12 = (f1(a...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
programming and plot equarion
z = -5:0.01:5; f = 2*z/sqrt(pi).*hypergeom(0.5,1.5,-z.^2); plot(z,f)

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
please guide me how to make plot from –pi to pi.
k = 6 + 6; size = 30 + 9; t = linspace(-pi,pi,1000); X = size * cos (k*t) .* cos(t); Y = size * cos (k*t)...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
How do fix this code to give me the error?
Cp = @(T) .00000000747989.*T.^3-.000028903.*T.^2+.0423484.*T+36.1064; H = @(T) 1/4*.00000000747989.*T.^4-1/3*.000028903.*T.^3+1...

fast 4 Jahre vor | 0

Mehr laden