Beantwortet
How to find the maximum value of the power and its position on the time axis (x,y)?
s=1.25; t1=0:0.01:pi/2; t2=pi/2:0.01:pi; t=[t1 t2]; p1= 4*(sin(2*t1)).^2.*exp(-t1/s).^2 + 2; p2= 4*(sin(2*t2)).^2.*exp(-t2/...

14 Tage vor | 1

Beantwortet
How to plot these three fucntion X,S and P in one graph with lines
t=0:0.5:14; X0=0.036; Xm=2.24; u0=1.14; S0=41.44; Ms=1.56; Yxs=0.37; Ypx=0.958; dt=0.90; X=(X0*Xm*exp(u0*t))./(Xm-X0+...

14 Tage vor | 0

| akzeptiert

Beantwortet
How to make 'for loop' for three variables (i,j,n)?
for i=1:m-1 instead of for i=2:m-1

15 Tage vor | 0

Beantwortet
goodness of fit data for a fit
Statistical information about the goodness of fit can be obtained by using "fit" instead of "lsqcurvefit" and the second output ...

15 Tage vor | 0

Beantwortet
why plot not generate for the following codes?
creation = 1; syms n alpha = sym(0.03); ketalpha1 = symsum(exp(-abs(alpha)^2 * alpha^n / sqrt(factorial(n)) ), n, 0, 10); ...

15 Tage vor | 0

| akzeptiert

Beantwortet
How to generate N independent, identically distributed random numbers from the Reciprocal Normal Distribution?
% Generate 10 random numbers from the inverse normal distribution % (mu=0, sigma=1) % % G(y) = 1 - F(1/y) % is the cumulati...

16 Tage vor | 0

| akzeptiert

Beantwortet
'integral' with piecewise expressions
L = 1; Beta = @(y,L) pi/2.*((0<=y) & (y<L/2)) + (pi/2+0.3491).*((L/2<=y) & (y<3/4*L)) + (pi/2-0.3491).*((3/4*L<=y) & (y<=L)); ...

16 Tage vor | 1

| akzeptiert

Beantwortet
All the combinations for 3 variables
https://de.mathworks.com/matlabcentral/fileexchange/5475-cartprod-cartesian-product-of-multiple-sets https://de.mathworks.com/m...

16 Tage vor | 0

| akzeptiert

Beantwortet
Plotting the function by the points that need to be determined
Maybe something like this ? %% initial conditions global d k0 h_bar ksi m E; Ef = 2.77*10^3; Kb = physconst('boltzmann'); %...

17 Tage vor | 0

Beantwortet
I don't know whether you and Sona Ghulami are the same person, but i suggest you start with the last code under https://de.math...

17 Tage vor | 0

Beantwortet
plotting a signal which has two equations
None of the two if conditions is satisfied for your t-array. Thus the array S_if does not exist after the for-loop - even if you...

17 Tage vor | 0

Beantwortet
defining a fitting type
My guess is fitType = @(x,a,b,c,d,f)Even_fit(x,a,b,c,d,f,N); fit(x,y,fitType)

17 Tage vor | 0

| akzeptiert

Beantwortet
Error using sym/coeffs. First argument must be a scalar.
My guess is that VG1_0(1,1) is interpreted as a polynomial in the variable q2_hiz(t). Since your expression does not contain q...

17 Tage vor | 0

| akzeptiert

Beantwortet
I cannot give this struct as input of a custom function, how can I do?
Works without problems. Have you saved an m-file named "myfunction.m" in your working directory ? var.hold_on = 1; var.box_on...

17 Tage vor | 0

Beantwortet
closest value to zero excluding the first one?
out of our list of stuff to search for ? v = [-0.1 2 4 -0.5 8]; [~,i] = min(abs(v(2:end))) v(i+1)

17 Tage vor | 0

Beantwortet
how to solve one variable in non linear equation?
T=12; u1=400;u2=8;a=30;b=5;a2=100;A=500;c2=10;c3=12;c4=8;D0=115; b2=0.2; a=-1.1;d=11.2;m=-0.5;k1=1.5;k0=1.1;k2=2; syms t1 c...

17 Tage vor | 1

| akzeptiert

Beantwortet
Error using plot vectors must be the same length
You can easily test what the error is. A plot command plot(x,y) can only be successful if: x is a column vector and y is a m...

17 Tage vor | 0

Beantwortet
Index exceeds the number of array elements
I suggest you insert values for p1 and solve for t1. This will be easier than the other way round. format longg syms p1 t1 nm...

18 Tage vor | 1

Beantwortet
Extracting symbolic values from symbolic matrix
syms t q2(t) q3(t) a1 a2 n1 = [a1*q3(t);a2*sin(q2(t));0]; n1(2,1) % extract element (2,1) n1(2,:) % extract complete 2nd ...

18 Tage vor | 0

| akzeptiert

Beantwortet
Why du/dx obtained from excel and Matlab gives different results?
If the X grid is equidistant, dudx = gradient(U,X(2)-X(1))

18 Tage vor | 0

Beantwortet
Desorption-Fixed bed- Initial conditions
Then set c0 = cFeed*ones(n,1) c0(1) = 0.0; q0 = qFeed*ones(n,1) as initial and boundary conditions of the desorption, if thi...

18 Tage vor | 0

| akzeptiert

Beantwortet
plot a function wit cos
f=(0:10); %f0=5*10^9; c=(3*10^8); t=5*10^9; w=2*pi*f; wt=w*t; k=(wt/c); z=(0.75:30); r12=0.29; %x=0.094*cos*(k*z); y=0...

18 Tage vor | 0

Beantwortet
How to fix error in my DAE program?
The call to ode15s is incorrect: [t,y] = ode15s(@(t,y) reduced21(t,y,T_a),tspan,y0); instead of [t,y,ydot] = ode15s(@(t,y,ydo...

18 Tage vor | 0

Beantwortet
How to generate matrix from iterations?
V1 =[0 20 60 80 100]; V2 =[20 60 80 100]; itermax = 10; for i = 1:numel(V1) v1 = V1(i); for j = 1:numel(V2) ...

18 Tage vor | 0

Beantwortet
how could i plot x^2+(y-x^3/2)^2=1 ?
fun = @(x,y)x.^2+(y-x.^3/2).^2-1; fimplicit(fun)

19 Tage vor | 0

Beantwortet
How to solve PDE with two regions
Yes. Choose "a" as a grid point for pdepe. Then you can solve your system as one partial differential equation for C_B by addin...

19 Tage vor | 0

Beantwortet
Unable to meet the tolerance without using more than 1666 mesh points.
Seems to work (see above).

19 Tage vor | 0

| akzeptiert

Beantwortet
too many input arguments Fmincon
parametersV = fmincon(objFun,parametersV,[],[],[],[],[],[],[],options); instead of parametersV = fmincon(objFun,parametersV,[]...

19 Tage vor | 0

| akzeptiert

Beantwortet
The control parameters of MILP