Answered
I am trying to solve current equations of a pv cell using fsolve butit keeps showing error, can someone pls see what the error in my code is?
clc; clear all; Pmpp = 50; %Max Power Vmpp = 17.98; %Vol at Pmax Impp = 2.77; %Current at Pmax Isc= 3; ...

3 years ago | 0

| accepted

Answered
Use one function in another
n = 7; a = [3 4 1 2 5 2 1]; A = createMatrix(n, a) period = findPeriod(A) function A = createMatrix(n, a) A = zeros(n);...

3 years ago | 0

| accepted

Answered
Bvp4c 2nd order equation with 2nd and 3rd order boundary conditions
Since you can only impose two boundary conditions for a second-order equation, take the first and the third. They should already...

3 years ago | 0

| accepted

Answered
Solve non linear m equations in n unknows with m,n
k = lsqnonlin(F,k0)

3 years ago | 0

| accepted

Answered
How can ı solve this difference equation ?
um2 = 0; um1 = 0; u0 = 1.5820; u1 = -0.5820; u2 = 0; xm2 = 0; xm1 = 0; x0 = 1.3679*xm1 - 0.3679*xm2 + 0.3679*um1 + 0.2642...

3 years ago | 0

| accepted

Answered
Variable not saving as a double
You mean t = 0:1:100; x = 0.5*exp(2*sin(t))./(10.5*exp(2*sin(t))); plot(t,x) (which is equal to 0.5/10.5=0.04761... because ...

3 years ago | 0

| accepted

Answered
Constraints on Parameter Estimation
Use lsqlin instead of fitlm.

3 years ago | 0

| accepted

Answered
problem in creating function file using ode45
Be careful with the order of the solution vector Y. It is (y, Dy, x, Dx). You have to supply the vector of initial values "ic" i...

3 years ago | 0

| accepted

Answered
How do I plot two different functions on the same plot?
Use hold on plot(...) % plot first graph plot(...) % plot second graph hold off

3 years ago | 0

| accepted

Answered
solving series of algebric linear equations using for loop
N = 4; xleft = 1.0; xright = 3.0; x = linspace(xleft,xright,N+1); h = (xright-xleft)/N; A = zeros(N+1); b = zeros(N+1,1); ...

3 years ago | 0

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
You don't define Kb as a global variable in the part of your code where you set it as Kb = physconst('boltzmann'); % 1.38*10^(-...

3 years ago | 1

Answered
Projectile Motion when y0 does not equal 0
Solve y(t) = 0 for t and you'll find tf, the time when the projectile hits the ground.

3 years ago | 1

Answered
Matrix "index in position 1 exceeds array bounds (must not exceed 1)"
i=1; X1(i)=0; X2(i)=0; X3(i)=0; error_X1(i)=9999; error_X2(i)=9999; error_X3(i)=9999; instead of i=1; X1=0; X2=0; X3=...

3 years ago | 0

Answered
invalid expression error.
B = 0.02; a = 0.1; f = 0.53; phi = 3*pi/4; t = -5:0.05:10; x = B^a*exp (-a*t) .*sin(... 2*pi*f*t+phi); xu = x...

3 years ago | 1

| accepted

Answered
please help i keep getting erro
samsonwork() function sol=samsonwork global Br Sc delta P K R n epsilon %x=linspace(-1,1,11); r=0:0.01:3; Br=1;Sc=0.4;n=3;d...

3 years ago | 1

| accepted

Answered
fmincon: proble defining the function
f = @definefunction; instead of f=definefunction(x); And you cannot use random inputs on each call - thus comp1 = double(ra...

3 years ago | 0

| accepted

Answered
Finding linear combination of two vectors such as every element is positive
n = 5; v1 = -10 + rand(1,n)*20 v2 = -20 + rand(1,n)*40 % If there is a solution x for which A*x > zeros(size(A,1),1), then th...

3 years ago | 1

Answered
User defined function within ode45
Symbolic functions like the one you get if you use the "piecewise" command are not allowed with ODE45. Either define the right-...

3 years ago | 0

Answered
How can I do a Monte Carlo simulation for 1000 runs on this operation?
Maybe you mean: % A = T(:,1); %Column vector A = [71.213; 74.499; 79.175; 54.163; 83.008; 52.615]; B = length(A); %size of c...

3 years ago | 0

| accepted

Answered
Can someone help me to correct the code ​​for this problem using ode45 solver?
This is a boundary value problem, not an initial value problem since conditions on f and theta are given on both ends of the int...

3 years ago | 1

Answered
i dont know why there is no anwser about this 'solve'
Three equations need three unknowns, not only one. clc; close all; clear; a1=20; b1=20; k1=sqrt((a1+10)^2+b1^2)-sqrt((a1-...

3 years ago | 0

Answered
Numerical integration of a nested integral; limits of inner integral depend on the outer integration variable
I'm not sure your integral exists ... Bessel_integrand = @(x) x .* besselj(0,x); Integrand_B = @(a) integral(Bessel_integrand,...

3 years ago | 1

Answered
Error in plotting a function, left and right side with diferent dimensions
Most probably, vet_servido(j) = - (1/2) * log(1- x_exp(j)); instead of vet_servido(j) = - (1/2) * log(1- x_exp);

3 years ago | 0

| accepted

Answered
Left division with partially known coefficient
It's a nonlinear fitting problem - backslash doesn't suffice here. I set p = 1/(d*K) . If you like, you can retransform the res...

3 years ago | 0

| accepted

Answered
Why do I get "Array indices must be positive integers or logical values"?
Ta = 504; y = 1.4; Ra = 1716; M = .1:.1:5; for i = 1:numel(M) u(i) = M(i)*sqrt(y*Ra*Ta); end plot(M,u) or simply Ta...

3 years ago | 0

Answered
numerical integration theorem of residues
You can define the function to be integrated in a function - you don't need to use handles. In this function, you can perform a...

3 years ago | 0

| accepted

Answered
Integral of matrix determinant
f=@(x)det([1,x;0,2]); integral(f,0,1,'ArrayValued',true)

3 years ago | 0

| accepted

Answered
custom logarithmic fit with three coefficients
It doesn't make sense to use three fitting parameters for the function type you supply. a + b*log(c*x) = a + b*log(c) + b*log(x...

3 years ago | 0

| accepted

Answered
lsqcurvefit for multiple variables optimization
We need your "YL_function" to see what's happening. I wonder whether your transformation is correct. I would have thought y_r...

3 years ago | 0

| accepted

Answered
Absurd result using 'integral2' with non-"centered" functions
It's not possible for integral2 to capture the small peak around 50 to return 1 as result. Use result = mvncdf([-Inf -Inf],[In...

3 years ago | 1

| accepted

Load more