Answered
How to find the maximum of symbolic equation which contains trigonometric terms?
syms gama H kv q beta phi g theta psi delta b P = 0.5*gama*((H)^2)*(1-kv)*((1+tan(beta)*tan(g))*tan(beta)+((1+tan(beta)*tan(g))...

4 years ago | 0

| accepted

Answered
How to find residual variance from fitlm
%% data x = [353.65 389.76 385.83 419.45 427.53 354.28 570.05 375.29 530.73 444.68 386.08 490.73 595.65 353.09 387.71 565.55 54...

4 years ago | 0

| accepted

Answered
Parameter covariance from lsqnonlin when using Jacobian Multiply function?
Can you form the (sparse) matrix B := [JACOB -speye(size(JACOB,1)) ; zeros(size(JACOB,2)) JACOB.'] ? Then you could try to so...

4 years ago | 0

Answered
Find a a value from a graph that is not in the array using reciprocal fit
t1= [6.22 3.59 2.68 2.53 2.19 1.82]; n= linspace(0.60,0.70,6); f1 = interp1(n,1./t1,0.653)

4 years ago | 0

| accepted

Answered
How do I take the average of elements of a vector depending on the values of another vector?
A = [2 3 2 2 3 4 3 3]; B = [0.1 0.2 0.22 0.13 0.07 0.88 0.3 0.5]; Au = unique(A,'stable'); C = arrayfun(@(i)mean(B(A==Au(i)))...

4 years ago | 0

| accepted

Answered
Least square magnitude solution
A = [1 2 3 4 5; 6 7 8 9 0]; b = [1;2]; x = lsqminnorm(A,b).' norm(x) norm(A*x.'-b) if you search for the solution for which...

4 years ago | 0

| accepted

Answered
solution of coupled differential equation
syms z11(x) z12(x) z21(x) z22(x) z31(x) z32(x) eqn1 = diff(z11) == z12; eqn2 = diff(z12) + z12 + z22 + z31 - 5 == 0; eqn3 =...

4 years ago | 1

| accepted

Answered
Solve BVP with datapoints as input variable
Pass the arrays of y-values, e_alpha and h_alpha to odefun: y_given = some 1d-array; ealpha_given = some 1d-array of the same ...

4 years ago | 0

| accepted

Answered
The difference between the results of int function and numerical solution
@Erdal Cokmez If m in your definition of f1 is an integer >0 , you can get a representation of f1 in terms of the incomplete ga...

4 years ago | 0

| accepted

Answered
I am getting Error using deval
Your integration could not be continued beyond t = 2.738123. So you try to evaluate the solution in a region where you have no...

4 years ago | 0

Answered
How can i calculate the length of curve?
I'd say Ankit's solution is the more intuitive. But Star Strider's solution should be second-order accurate while Ankit's is o...

4 years ago | 1

Answered
How do i count numbers ending in 3
x = [234 352 298 213 365 321 293 213]; n = numel(x); end_digit = zeros(n,1); for i = 1:n y = num2str(x(i)); end_digit(i...

4 years ago | 1

Answered
Solution of nonlinear equation
format long a0 = rand(1,7); %a0 = [5.3916,0.0342,1.789,0.619,-0.0104,0.2155,0.0575]; options = optimset('MaxFunEvals',1000000...

4 years ago | 0

| accepted

Answered
generate mean, variance and std using built in function
help mean help var help std

4 years ago | 0

Answered
Trapz error in calculating 2D integrals: ORDER contains an invalid permutation index
Although I have no idea of what you are doing in your code ... %q =4 case %Part I of the code a=0.25; N=100; q=1; Eigenv...

4 years ago | 0

| accepted

Answered
How can i use semi-discretization by finite differences for Pdes SYSTEM?
How do i manage all three equations related to each other? By using MATLAB's "pdepe" instead, at least if you only have one spa...

4 years ago | 0

| accepted

Answered
linprog function over multi period
Hint: Define x_1,i to be the number of experienced workers in year i and x2_i the number of new workers in year i. Set up the ...

4 years ago | 1

| accepted

Answered
Provide partial gradient and Hessian to fminunc.
It it possible to provide fminunc only with a partial gradient and Hessian and let it do numerical gradient and Hessian estimati...

4 years ago | 1

| accepted

Answered
ERROR: Fitting a custom function to my data
Since we don't have data to test your code, we are not able to comment on your question. Most probably, the line T_model_MILS...

4 years ago | 0

Answered
how to do if and else statement for this equation
q=[ 0.000585366 0.015219512 0.100829268 0.153512195 0.211317073 ]; c1=[2.913953437 0.3570620...

4 years ago | 0

| accepted

Answered
Finding minimum value from a graph
[y_min,i_min] = min(dataset3) x_min = time_ms(i_min)

4 years ago | 0

Answered
Solution of Differential Equation with only variables.
Sure. syms V(t) b c sol = dsolve(diff(V,t)==b-c*V^2)

4 years ago | 0

| accepted

Answered
Multispecies Diffusion - Fick's 2nd Law (PDEs)
Check the consistency of the length and time units for your constants L, t, D and C0. L = 15; x = linspace(0,L,3000); %t = l...

4 years ago | 1

| accepted

Answered
ODE 45 Extra parameter
I think there is quite a noticable difference between the solution curves. %Q1 tspan = [0 15]; a = 1000 + 1000*2; r = 0.25; ...

4 years ago | 0

| accepted

Answered
curve fit gaussian CDF
ydata = [ 0.0010 0 0.0020 0.0060 0.0210 0.0400 0.0840 0.1890 0.2790 0.4500 0.6180 0.755...

4 years ago | 1

Answered
how to fit the data properly to custom eqaution?
If you want your model curve start at (0,1), delete the constant term k3/3500*3502. Your experimental curve looks more like an ...

4 years ago | 0

| accepted

Answered
I want to do stop condition which demand dx=0 in coupled differential equations
alpha=0.5; beta=0.5; r1=2; r2=3; s1=1; s2=1; t0 = 0; tfinal = 10; y0 = [1; 1]; AnonFun = @(t,y)diag([2+0.5*y(2)-1*y(...

4 years ago | 0

| accepted

Answered
Find Which rows/items have a positive correlation with another item
format long A = [1 2 0 4;0 2 3 4;0 1 2 3;1 3 4 2;0 0.5 1 1.5].'; R = corrcoef(A)

4 years ago | 0

Answered
Numerical integration with two parameters
You should check whether the integral exists when y = x^2/4. In this case, the denominator of fun is 0, and I think you'll have ...

4 years ago | 0

Answered
Second order diffrential equation solve using ode 45
Set x(1) = y and x(2) = dy/dt. Then you get a system of differential equations dx(1)/dt = x(2) dx(2)/dt = -x(2) + sin(100*t) ...

4 years ago | 1

Load more