Answered
Using Optimizing Nonlinear Functions to find mutiple variations
xdata=[125 127 129 131 133 135 137 139 141 143 145]; ydata=[0.002 0.003 0.009 0.025 0.053 0.089 0.104 0.09 0.07 0.041 0.017]; ...

2 years ago | 0

| accepted

Answered
matlab code for 2nd order differential equation with boundary conditions
You have a boundary value problem, not an initial value problem. ode45 is not suited in this case. Use bvp4c or bvp5c instead. ...

2 years ago | 0

Answered
Matlab code: deflection of simply supported beam using ode45
Hi, my code keeps returning a function for a cantilever beam rather than a simply supported. How do I fix this?? By using bvp4c...

2 years ago | 0

Answered
Solving a system of ordinary differential equations
It's just the starting phase where you observe a linear profile (see below). tspan = [0 60000]; %timespan y0 = [0.0675 0.0075...

2 years ago | 0

Answered
nonlinear constraint game theory
By the way: What do you mean by "nonlinear constraint game theory" ? Your constraints are all linear. % Define the objective fu...

2 years ago | 1

Answered
Solution of nonlinear ordinary differential equation of second order
I suggest you integrate the equation y" = A (x^4) twice with respect to x and adjust the two free constants from the integrati...

2 years ago | 1

Answered
The output of solve(eqn, x) is still an equation instead of number
Use G2 = double(solve(subs(equation1))) instead of G2=solve(equation1,G2)

2 years ago | 1

Answered
Finding column index for matching values in a matrix
poschannel = [1 3 -5;0 3 4;-1 1 9]; rows_with_1 = arrayfun(@(i)any(poschannel(i,:)==1),1:size(poschannel,1)) or shorter rows_...

2 years ago | 0

| accepted

Answered
Help with fmincon Optimization for a Function Involving Matrices in MATLAB
y = 3; if y > 1 & y < 5 obj = @(p)0.5*p(1)*p(2)+0.34*p(3); nonlcon = @(p) deal([],p(4)-p(1)*p(2)*p(3)); A = [0 0...

2 years ago | 0

| accepted

Answered
Energy method with Hermite cubic function (2 essential condition)
m and nv are inputs to the function "ex_enerHermite". Where do you set these values and where do you call the function ?

2 years ago | 0

| accepted

Answered
Conversion from ellipsoidal to geocentric cartesian
I don't think that you need iteration. The 5 steps for conversion are given in the section "Algorithm" under https://uk.mathwor...

2 years ago | 0

| accepted

Answered
Extract columns and rows from matrix
first = rand(5) second = rand(5) second(5,:) = first(:,1).'

2 years ago | 0

| accepted

Answered
Need some change in the present Analytical solution code which I'm unable
syms x F1(x) G1(x) H1(x) n fw h Nt = 0.5; Nb = 0.5; Pr = 1; Le = 2; DF = diff(F1,x); eq1 = diff(F1,x,3) + diff(F1,x,2) == 0; ...

2 years ago | 0

| accepted

Answered
Please help with fzero function . Thanks
Convert dh_CO2 and dh_H2O from symbolic functions into function handles by using "matlabFunction". After this, they can be use...

2 years ago | 1

Answered
Don't know how to put set of numbers in equation
Replace N = a / (sqrt(1-e2 * sin(fi)^2))^3/2 by N = a ./ (sqrt(1-e2 * sin(fi).^2)).^3/2 For an explanation, I suggest readin...

2 years ago | 0

Answered
Index exceeds the number of array elements error
y(i-N:i-1) is a vector of length N z(i-N:i-N+M) is a vector of length M+1 y(i) is a single value of length 1 How do you imagi...

2 years ago | 0

Answered
Fsolve 19 state variables with matching dimensions
Rename F in this assignment: F = Fin + Fr F is reserved for the 19-element function vector that you return to fsolve.

2 years ago | 0

| accepted

Answered
Please help, I have no idea how to do this integral in matlab
The integral seems to exist for those values of theta0 with cos(theta0) ~= 0, thus theta0 ~= (2*k+1)*pi/2 for k in Z. In this c...

2 years ago | 1

| accepted

Answered
Simplify symbolic division abs(Z)/Z
Use z*z' instead of abs(z)^2: syms z u = z*z'/z

2 years ago | 0

Answered
Why is ode45 failing to solve this system of ODEs?
Your matrix L has 9162 NaN values. This is most probably caused by the division by (x+1) which is problematic for the problem b...

2 years ago | 1

| accepted

Answered
Store Values in Array per Loop iteration issues
Replace [i, ~] = find(Strain < 0.01 | Strain > 0.15); Strain(i, :) = []; by [j, ~] = find(Strain < 0.01 | Strain > 0.15); S...

2 years ago | 0

| accepted

Answered
I need to pursue the developement of a variable within a function, but I don't know how.
[t_num,x_num]=ode15s(@DGL,tspan,q0); C11_num = c_m+c_a*sin(om*x_num(:,1));

2 years ago | 1

| accepted

Answered
Im trying you solve the component mass balance and energy balance equations for an adsorption system. Im getting some exponential growth in the plots.
Use Upwind Differencing for the convection terms: dTdz(2:n) = (T(2:n)-T(1:n-1))/h; dJdz(2:n) = (J(2:n)-J(1:n-1))/h...

2 years ago | 0

| accepted

Answered
Error using bvp4c Unable to solve the collocation equations -- a singular Jacobian encountered. Error in MHDI_ori (line 54) sol = bvp4c (@OdeBVP, @OdeBC, solinit, options
You say you want to have yb(2) - R = 0 and yb(2) - 1 = 0 at the same time as boundary conditions. This is not possible.

2 years ago | 1

| accepted

Answered
Error with 3D interpolation: Interpolation requires at least two sample points for each grid dimension
VsGrid = csvread('3d_Vs_utm_samplefile.csv'); X = VsGrid(:,1); % UTM X Y = VsGrid(:,2); % UTM Y Z = VsGrid(:,3); % Depth V =...

2 years ago | 0

| accepted

Answered
Where to find Hash Sums of Matlab Downloads?
Does this help ? https://codesigningstore.com/how-to-check-file-checksum https://uk.mathworks.com/matlabcentral/answers/540626...

2 years ago | 0

Answered
How do I generate a random number vector composed of just 1 and -1
s = -1 + 2*randi([0 1],100,1) nnz(s==-1) 100-nnz(s==-1)

2 years ago | 1

Answered
How can I plot graph in this relationship?
s=0; hold on for j=1:1:10 s=s+j; disp(['j = ', num2str(j)] ); disp(['s = ', num2str(s)] ); plot(j,s,...

2 years ago | 0

| accepted

Answered
Array Problem How can I unpack an array? why the firt element pf my array is always 0?
We don't know how you call the function - so we cannot predict I1, I2 and I3. To your second question: I = [3 5 -6]; [I1,I2,I...

2 years ago | 0

Answered
Integrate pressure over area, from dataset points
Maybe you want to get mean pressure over the face. In this case, divide "sol" by area = pi*(5^2-1^2) as done below. x = load("x...

2 years ago | 1

| accepted

Load more