Answered
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...

10 dagar ago | 0

| accepted

Answered
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)...

11 dagar ago | 0

Answered
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...

11 dagar ago | 0

Answered
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...

12 dagar ago | 0

| accepted

Answered
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(...

12 dagar ago | 0

Answered
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 ...

12 dagar ago | 0

Answered
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...

13 dagar ago | 0

| accepted

Answered
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) ...

13 dagar ago | 0

Answered
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...

13 dagar ago | 0

Answered
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...

13 dagar ago | 0

Answered
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...

14 dagar ago | 0

Answered
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...

14 dagar ago | 0

Answered
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)];...

14 dagar ago | 0

| accepted

Answered
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(...

14 dagar ago | 0

Answered
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...

14 dagar ago | 0

Answered
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 ...

14 dagar ago | 0

| accepted

Answered
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...

15 dagar ago | 0

Answered
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'...

15 dagar ago | 0

Answered
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....

15 dagar ago | 0

Answered
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...

16 dagar ago | 0

| accepted

Answered
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...

16 dagar ago | 1

Answered
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...

16 dagar ago | 0

Answered
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 + (...

17 dagar ago | 0

| accepted

Answered
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)

17 dagar ago | 1

Answered
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...

17 dagar ago | 0

| accepted

Answered
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...

17 dagar ago | 0

| accepted

Answered
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)

17 dagar ago | 1

Answered
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,...

18 dagar ago | 0

| accepted

Answered
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);...

18 dagar ago | 0

| accepted

Answered
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)...

19 dagar ago | 0

Load more