Réponse apportée
Unrecognized function or variable 'trapizoidal'.
This works for me exactly as you have listed it! This is the output: Function for which integration have to do f(v)= @(v)...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
converting values from conditional to single equation
One possibility f = x(i)*(x(i)>=0) + 0.2*(exp(x(i)) - 1)*(x(i)<0);

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
make the line with the graph
More like this vin=linspace(0.2,2.8); current = zeros(1,numel(vin)); for i = 1:numel(vin) v = vin(i); if v < 0.5 ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Can someone solve the error for if sign(df(i-1))~=sign(df(i+1)) % it is a maximum
You start the loop for i=1:nx-2 from 1; but then have if sign(df(i-1))...etc. which means that you are specifying df(0). T...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
dividing integrals using vpaintegral and syms
If f(r) = r and you are integrating wrt r (implied by your yG integral) then x = r and xG = 2/3 and yG = 1/3. If you are expec...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
I'm getting the error "Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-31." The function Tn1(:,i)=tridiagonal(b,a,c,d); where there error lies, Can someone help me with this.
You should probably define Tn=Tinf*ones(N,M); and then set Tn1(:,i)=tridiagonal(b,a,c,d)'; However, there are other problems...

plus de 5 ans il y a | 0

Réponse apportée
Accented characters with interpreter latex
Just use title('Intensità') That works!

plus de 5 ans il y a | 0

Réponse apportée
Unrecognized function or variable 'FalsePosition'.
It works just fine for me! (I copied it into a script, saved the script and then clicked the Run arrow).

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
What is wrong in me code? anyone can tell me please
If you do the suggested substitution your function should become f = @(t) (1/3)./(1+t.^(4/3)); and the limits are a = 0; b =...

plus de 5 ans il y a | 1

Réponse apportée
How to plot graph of Simpson's rule and Trapezoidal rule between error and n?
If you use cumsum instead of just sum then you can plot tr and simp against x.

plus de 5 ans il y a | 0

Réponse apportée
How to integrate a function over whose integrand upper limit is defined as an array?
You could try the following eta_array = [0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 2.6 3 3.4 3.8 4.2 ... 4.6 5 5....

plus de 5 ans il y a | 0

Réponse apportée
Answer not correct when comparing to wolframalpha
Your WolframAlpha expression is a mixture of your Function_A and Function_M. You have used G_M, from Function_M, but in the de...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Solving differential equations involving heaviside function.
Here's a snippet that works, but it would be better if you uploaded your code, as we stand a better chance of solving your probl...

plus de 5 ans il y a | 1

Réponse apportée
How to add a 'No Data' label on a Bar plot
Add something like the following at the end of your code text(10,102,'No Data','Rotation',90) text(11,102,'No Data','Rotation'...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Sum of selected elements in Matrix
How about: for i=1:10, S(i) = sum(sum(A(1:i,1:i))); end where A is your 10x10 matrix and S contains the 10 sums.

plus de 5 ans il y a | 0

Réponse apportée
How to find the root value of h in a differential equation?
Try adding the line h = vpasolve(Df(h)==0,h)

plus de 5 ans il y a | 0

Réponse apportée
Summation of matrices using symsum or other
It's difficult to tell from what you've listed, but have you tried getting rid of all symbolic stuff and using just numerics (wh...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Using for loop with ODE solver
Structurally, your code needs to look more like the following: T_span_MSK = linspace(460,860)'; % E_MSK = []; %matrix of aci...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Not sure if i've writen this program properly
Your code looks ok, except that, since your gravity is in cm/sec^2, it should probably be slightly modified to radius = input('...

plus de 5 ans il y a | 0

Réponse apportée
Alternative Newton-Method using for-loop
This f = @(x) x^3-x^2-x+1; MaxIter = 100; TolX = 1e-2; x0 = -0.2; delta = 1*10^(-5); iter = zeros(MaxIter+1,1); %Pre-alloc...

plus de 5 ans il y a | 0

Réponse apportée
Alternative Newton-Method using for-loop
It works for me ok using the function f = x^3-x^2-x+1 and initial guess x0 = -2. However, replace if k == MaxIter fprintf('Th...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
write the program to calculate real roots of quadradic equation with nested function.
You are over complicating things! All you need is function[x1,x2]= quadratic(a,b,c) d = sqrt(b^2-4*a*c); ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
3-D-plot doesn't look like on Wolfram Alpha
It looks the same to me as long as you enter plot sin(x)/(y^2+1) from x=-2 to 2 and y=-2 to 2 into Wolfram Alpha

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Trying to simplify code to see if 3 vectors are at right angle. Unsure of outcome.
The dot product is zero if the vectors are at right angles. help dot

plus de 5 ans il y a | 0

Réponse apportée
How to create Runge-Kutta 4th order method to solve second-order ODE's
A little more like this perhaps (note the MATLAB syntax): fx = @(v) v; fv = -9.8; tmax = 2; t0 = 0; n = 50; v0 = 10; h=(t...

plus de 5 ans il y a | 0

Réponse apportée
shewel function writing to find the global minimum with three variables
You probably want abs not mod. You don't define F1 or F2 anywhere within the function You have ouput not output in the last li...

plus de 5 ans il y a | 0

Réponse apportée
1D Advection-Diffusion
Perhaps this will help % Concentration Distribution of contaminant (C) T = 4000*24; % [hrs] total time D = (1E-6)*360...

plus de 5 ans il y a | 3

| A accepté

Réponse apportée
Antoine's equation - K values
Like this perhaps: s = [0.3; 0.5; 0.2]; P = 10; fi = 0.7; n = 3; A = [9.1058; 9.0580; 9.2131]; B = [1872.46; 2154.9; 24...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Input a Vector as Function Argument
Either x = [2 , 4] y = sq(x(1),x(2)) function out = sq(a , b) out = a.^2 + b; end or x = [2 , 4] y = sq(x) func...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Problem in generating iterations in 3/8 simpson rule
Not entirely clear to me between what limits you are integrating, nor what your loops are doing! Perhaps the following might hel...

plus de 5 ans il y a | 0

| A accepté

Charger plus