回答済み
terminate loop diverging to inf
I'm not sure, but I guess you meant something like this: NT = 1024; N = 2048; r = 0.9; omega = (sqrt(5)+1)/2; phi = 2*pi*om...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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)...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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(...

2年以上 前 | 0

回答済み
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 ...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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) ...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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)];...

2年以上 前 | 0

| 採用済み

回答済み
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(...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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 ...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

回答済み
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'...

2年以上 前 | 0

回答済み
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....

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 1

回答済み
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...

2年以上 前 | 0

回答済み
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 + (...

2年以上 前 | 0

| 採用済み

回答済み
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)

2年以上 前 | 1

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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)

2年以上 前 | 1

回答済み
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,...

2年以上 前 | 0

| 採用済み

回答済み
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);...

2年以上 前 | 0

| 採用済み

さらに読み込む