A répondu

Sum of sines optimized starting points

https://uk.mathworks.com/matlabcentral/answers/511413-curve-fitting-tool-starting-points If your problem is linear in the fitti...

Sum of sines optimized starting points

https://uk.mathworks.com/matlabcentral/answers/511413-curve-fitting-tool-starting-points If your problem is linear in the fitti...

9 jours il y a | 0

| A accepté

A répondu

My index starts at the second element. I dont know why

Before MATLAB enters the for-loop, t(i), v(i) and x(i) are only defined for i = 1. In the loop, you also don't define t(i), v(i)...

My index starts at the second element. I dont know why

Before MATLAB enters the for-loop, t(i), v(i) and x(i) are only defined for i = 1. In the loop, you also don't define t(i), v(i)...

10 jours il y a | 0

A répondu

Rational function produced by the Curve Fitter App does not match the output graph

Look up the documentation to see what the option opts.Normalize = 'on'; means. The coefficients are used to approximate y vs...

Rational function produced by the Curve Fitter App does not match the output graph

Look up the documentation to see what the option opts.Normalize = 'on'; means. The coefficients are used to approximate y vs...

10 jours il y a | 0

A répondu

Badly conditioned equations - how can I centre and scale properly

Your problem is linear, but fitting data with an independent coordinate up to 1500 by a polynomial of degree 12 is nonsense. al...

Badly conditioned equations - how can I centre and scale properly

Your problem is linear, but fitting data with an independent coordinate up to 1500 by a polynomial of degree 12 is nonsense. al...

10 jours il y a | 0

| A accepté

A répondu

Unable to perform assignment because the left and right sides have a different number of elements.

k1v and k2v both are vectors of size 1x60001, but they must be scalars in the assignment. Maybe you mean V(j+1) = V(j) + (k1v(...

Unable to perform assignment because the left and right sides have a different number of elements.

k1v and k2v both are vectors of size 1x60001, but they must be scalars in the assignment. Maybe you mean V(j+1) = V(j) + (k1v(...

11 jours il y a | 0

A répondu

How can I simplify this expression using "abs" function?

You must determine the value for k0 where the expression 2*n^3 + 3*n^2 + n - 2*k^3 - 3*k^2 - k - k*(k+1)*(2*k+1) changes sign ...

How can I simplify this expression using "abs" function?

You must determine the value for k0 where the expression 2*n^3 + 3*n^2 + n - 2*k^3 - 3*k^2 - k - k*(k+1)*(2*k+1) changes sign ...

11 jours il y a | 0

A répondu

PDEPE function - BCFUN error

Use function [ptop, qtop, pbot, qbot] = bcfun(ztop, Ttop, zbot, Tbot,t) % hc and Hs are vectors ptop = hc.*(Ttop-env(:,1))+ e...

PDEPE function - BCFUN error

Use function [ptop, qtop, pbot, qbot] = bcfun(ztop, Ttop, zbot, Tbot,t) % hc and Hs are vectors ptop = hc.*(Ttop-env(:,1))+ e...

11 jours il y a | 0

| A accepté

A répondu

I need help with elemental wise operation for a first point iteration method

%% Input Variable Uinf = 11; % freestream veloctiy (m/s) R = 6.25; % Radius of Rotor (m) ...

I need help with elemental wise operation for a first point iteration method

%% Input Variable Uinf = 11; % freestream veloctiy (m/s) R = 6.25; % Radius of Rotor (m) ...

12 jours il y a | 0

A répondu

Solve ODE without initial condition

Your ODE is nonlinear. The symbolic toolbox is not able to find an analytical solution for it. You will only be able to solve it...

Solve ODE without initial condition

Your ODE is nonlinear. The symbolic toolbox is not able to find an analytical solution for it. You will only be able to solve it...

12 jours il y a | 0

A répondu

this is my sample code and i have to plot 8 by 8 matrix in my actual code, the code itself is correct but it is taking forever,any other way to plot this please help

w=1:3; c44 = 44; n = numel(w); y = zeros(n,1); y1 = zeros(n,1); y2 = zeros(n,1); y3 = zeros(n,1); for j = 1:numel(w) y...

this is my sample code and i have to plot 8 by 8 matrix in my actual code, the code itself is correct but it is taking forever,any other way to plot this please help

w=1:3; c44 = 44; n = numel(w); y = zeros(n,1); y1 = zeros(n,1); y2 = zeros(n,1); y3 = zeros(n,1); for j = 1:numel(w) y...

12 jours il y a | 0

A répondu

ODE45 solving 3 equations and comparing to RK-4

%% RK4 methods %% Description % RK4 methods are used to solve coupled first-order ODEs clear close all clc %% Input vari...

ODE45 solving 3 equations and comparing to RK-4

%% RK4 methods %% Description % RK4 methods are used to solve coupled first-order ODEs clear close all clc %% Input vari...

12 jours il y a | 0

A répondu

How to check the convergence and accuracy of the Problem using BVP4c

Inf = 3 seems to be sufficient: global alpha beta Pr Nb Nt %eq1 alpha=1.2; beta=0.3; %eq2 Pr=1.7; Nb=0.1; Nt=0.1; hold o...

How to check the convergence and accuracy of the Problem using BVP4c

Inf = 3 seems to be sufficient: global alpha beta Pr Nb Nt %eq1 alpha=1.2; beta=0.3; %eq2 Pr=1.7; Nb=0.1; Nt=0.1; hold o...

12 jours il y a | 0

A répondu

How can I plot?

syms b omega r t theta T delta b = 0.1; omega = 2*pi/5; r = b*(1+omega*t); theta = omega*t; C = [r*cos(theta); r*sin(theta)];...

How can I plot?

syms b omega r t theta T delta b = 0.1; omega = 2*pi/5; r = b*(1+omega*t); theta = omega*t; C = [r*cos(theta); r*sin(theta)];...

12 jours il y a | 0

| A accepté

A répondu

why isn't my newton rhapson method giving me a quadratic conversion rate?

If b=log(d/dI)/(2*kw); instead of b=log(d/dI)/2*kw; as was first written in your previous code, then B must also be B=(log(...

why isn't my newton rhapson method giving me a quadratic conversion rate?

If b=log(d/dI)/(2*kw); instead of b=log(d/dI)/2*kw; as was first written in your previous code, then B must also be B=(log(...

13 jours il y a | 0

A répondu

I am getting this error "Index exceeds the number of array elements. Index must not exceed 1."

You define ICs = 43.4; Therefore, ode15s expects that you want to solve one differential equation. Consequently, "var" in th...

I am getting this error "Index exceeds the number of array elements. Index must not exceed 1."

You define ICs = 43.4; Therefore, ode15s expects that you want to solve one differential equation. Consequently, "var" in th...

13 jours il y a | 0

A répondu

While loop shows the result of the previous run

% Check if there's any change in the matrix positions previous_matrix = matrix; % Store the previous matrix ...

While loop shows the result of the previous run

% Check if there's any change in the matrix positions previous_matrix = matrix; % Store the previous matrix ...

13 jours il y a | 0

| A accepté

A répondu

Run pdepe solver in adjacent domains: introduce flux BC at the interface

If you make r = R_T a point of the r-vector, the finite element solver pdepe will automatically respect continuity of c and dc/d...

Run pdepe solver in adjacent domains: introduce flux BC at the interface

If you make r = R_T a point of the r-vector, the finite element solver pdepe will automatically respect continuity of c and dc/d...

14 jours il y a | 0

A répondu

Derivative not working plot

clear; clc; close all; % Curve Fit x = [6500 6350 6000 5400 5200 4500]; y = [0 0.25 0.5 0.75 0.875 1.0]; theFit=fit(x'...

Derivative not working plot

clear; clc; close all; % Curve Fit x = [6500 6350 6000 5400 5200 4500]; y = [0 0.25 0.5 0.75 0.875 1.0]; theFit=fit(x'...

14 jours il y a | 0

A répondu

while loop running forever during attempt at Newton Rhapson method

Your function doesn't seem to have a zero. d=0.007; dI=1.219; Rfi=1.76*(10^(-4)); Rf0=Rfi; hs=356; ht=hs; kw=60; dTm=29....

while loop running forever during attempt at Newton Rhapson method

Your function doesn't seem to have a zero. d=0.007; dI=1.219; Rfi=1.76*(10^(-4)); Rf0=Rfi; hs=356; ht=hs; kw=60; dTm=29....

14 jours il y a | 0

A répondu

For loop doesn't work well.

Somewhere in the line P(i) = P(i-1) - dPD_tot(i); the "dx" must come into play because you usually compute the pressure gradie...

For loop doesn't work well.

Somewhere in the line P(i) = P(i-1) - dPD_tot(i); the "dx" must come into play because you usually compute the pressure gradie...

14 jours il y a | 0

| A accepté

A répondu

I have a problem with the convergence of fsolve ?

You could try solution = [10,10,1.2]; % Initial guess for R1, R2, Omega % Solve the equations for eachU value for i = 1:lengt...

I have a problem with the convergence of fsolve ?

You could try solution = [10,10,1.2]; % Initial guess for R1, R2, Omega % Solve the equations for eachU value for i = 1:lengt...

15 jours il y a | 1

A répondu

How manage for loop to calculate distances?

I should have a new "all_distances" variable with 5 values of distance, but it is only showing the error: Why 5 ? You should ha...

How manage for loop to calculate distances?

I should have a new "all_distances" variable with 5 values of distance, but it is only showing the error: Why 5 ? You should ha...

15 jours il y a | 0

A répondu

runge kutta algae flower

Don't you have to call rk4 twice for stepsize h/2 to compare the results ? And shouldn't the Runge-Kutta step be pout = xk + (...

runge kutta algae flower

Don't you have to call rk4 twice for stepsize h/2 to compare the results ? And shouldn't the Runge-Kutta step be pout = xk + (...

15 jours il y a | 0

| A accepté

A répondu

Find all possible combinations of numbers with a specific array length

M = categorical(["A","B","C","D"]); combinations(M,M,M,M,M,M,M,M,M,M,M,M)

Find all possible combinations of numbers with a specific array length

M = categorical(["A","B","C","D"]); combinations(M,M,M,M,M,M,M,M,M,M,M,M)

15 jours il y a | 1

A répondu

Finite method for a heat generating furnace

You use "j" twice as loop index in a nested loop. This will give problems. for j=1:Ny for i=1:Nx if i==Nx...

Finite method for a heat generating furnace

You use "j" twice as loop index in a nested loop. This will give problems. for j=1:Ny for i=1:Nx if i==Nx...

16 jours il y a | 0

| A accepté

A répondu

Not enough input arguments. Error in mypde_model>bcfun (line 53) ptop =utop - interp1(time, mydata(:,5), t,'spline'); Error in mypde_model (line 17) sol = pdepe(m, @pdefun,

Use sol = pdepe(m, @pdefun, @(z)icfun(z,u_ini1,u_ini2, Z),@(ztop, utop, zbot, ubot,t) bcfun(ztop, utop, zbot, ubot,t,time, myda...

Not enough input arguments. Error in mypde_model>bcfun (line 53) ptop =utop - interp1(time, mydata(:,5), t,'spline'); Error in mypde_model (line 17) sol = pdepe(m, @pdefun,

Use sol = pdepe(m, @pdefun, @(z)icfun(z,u_ini1,u_ini2, Z),@(ztop, utop, zbot, ubot,t) bcfun(ztop, utop, zbot, ubot,t,time, myda...

16 jours il y a | 0

| A accepté

A répondu

Unable to find explicit solution.

You must use "dsolve", not "solve": syms t x(t) K eqn = diff(x,t) == (1-x/K)*x; dsolve(eqn)

Unable to find explicit solution.

You must use "dsolve", not "solve": syms t x(t) K eqn = diff(x,t) == (1-x/K)*x; dsolve(eqn)

16 jours il y a | 1

A répondu

Doubt in Coupled Ode

Your code is correct, but it seems there is a singularity near 0.32.... syms t x(t) y(t) a1 b1 a2 b2 Constant eqn1 = diff(x,t,...

Doubt in Coupled Ode

Your code is correct, but it seems there is a singularity near 0.32.... syms t x(t) y(t) a1 b1 a2 b2 Constant eqn1 = diff(x,t,...

16 jours il y a | 0

| A accepté

A répondu

Solving a complex system of differential equations

%q(1) = X, q(2) = Y, q(3) = Xdot, q(4) = Ydot M = [1,0.8;0.8,7]; K = [5,0;0,10]; D = [0.15,0;0,0.35]; F = @(t)[5*exp(i*5*t);...

Solving a complex system of differential equations

%q(1) = X, q(2) = Y, q(3) = Xdot, q(4) = Ydot M = [1,0.8;0.8,7]; K = [5,0;0,10]; D = [0.15,0;0,0.35]; F = @(t)[5*exp(i*5*t);...

17 jours il y a | 0

| A accepté

A répondu

Piecewise function graph help

L=200; d=10; s=30; r1_max=22.36; r2_max=120.4; r=0:200; for i=1:length(r) if r(i) < d F(i)=0; elseif (r(i) >=d)...

Piecewise function graph help

L=200; d=10; s=30; r1_max=22.36; r2_max=120.4; r=0:200; for i=1:length(r) if r(i) < d F(i)=0; elseif (r(i) >=d)...

17 jours il y a | 0