Réponse apportée
Trouble plotting solution to two 2nd order ODEs using forward Euler method
The following sorts out your Euler integration: v0=85;%m/s angle=51*pi/180;%rad g=9.81;%m/s^2 m=0.145;%kg r=0.036;%m A=pi*...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Return the value of Matrix
mat_c(:,2)

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
vibration of a rod using spectral element method
I don't know if it solves your problem, but your last line should probably have ifft(u2f) not ifft(u2) on the right hand side.

plus de 5 ans il y a | 0

Réponse apportée
Not enough input arguments error in function
The following works for me (I['ve chosen random numbers for x as you didn't say what ones you used): x = rand(1,12); y = organ...

plus de 5 ans il y a | 0

Réponse apportée
How to merge tow rows in one row?
Like so A = [ 1 2 3 4 5 6 7 8 9 10 11 12]; B = [A(1,:) A(2,:)];

plus de 5 ans il y a | 0

Réponse apportée
Matlab Numerical integral issue
Your problem occurs when the upper limit of the integration exceeds k0. Are you sure the functions are defined correctly for th...

plus de 5 ans il y a | 0

Réponse apportée
Why is an extra line being plotted?
More like this, I think: numFlr=2; Phi_EigVec=[1 3;2 -3;]; y1=zeros(numFlr,1); y2=zeros(numFlr,1); x1=zeros(numFlr,1); x...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Substitute the value of variable in an equation
Like this, for example: F = @(x,y,a) 3*x.^2*y+4*y.*x.^3+3*a*x; F1 = @(x,y,a) 4*x.*y.^2+3*y; x = 2; a = 3; y = 4; disp(F(...

plus de 5 ans il y a | 1

Réponse apportée
how can I interpolate functions
doc interp1

plus de 5 ans il y a | 0

Réponse apportée
not geting the plot and my loop is not working
Needs to be as follows: sigma=0.047193; V_tip=180; W=180; Cd_avg=0.01; R=2.235; Rv=80.529; ...

plus de 5 ans il y a | 0

Réponse apportée
function reshape creating matrix
"A" only has 11 elements. You want B to have 12 elements (3*4). If you set A = 10:21, for example, it will work.

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
tryin analyze a 3d truss
Your matrix "connectivity" has 12 rows, but only 2 columns, yet you are trying to access the third (4'th, 5'th ...12'th) column....

plus de 5 ans il y a | 0

Réponse apportée
Filling in values of a formula into another formula.
Your equation depends only on t, not x. The following is a modification of your code where I've removed the parameters that are...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
ising model ploting problem
You have your plot commands within function "initSpins", which is never called by the coding above it! Also check line 49, wher...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Integral Not Calculating Numeric Result
Replace q = int(F,1,2) by q = int(F,1,2,'IgnoreAnalyticConstraints',true)

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to calculate a certain length of mean in a row of data points?
Use reshape to turn the 500000x1 vector into a 50000x10 matrix, then use mean and std on this.

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Run and plot complex function
You probably meant to put parentheses in the following line: X=exp(1i*Omega)./exp(1i*Omega)-0.8; Did you mean: X=exp(1i*Omega...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to control the outcome of an ODE?
How about just modifying dydt(5) within the function to % Temperature if y(5)>=600 dydt(5) = 0; else dydt(5) = ( (...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Error when solving differential equations
Your function has function dydt = vdpi1(t,y) but you really want dy returned, not dydt.

plus de 5 ans il y a | 0

Réponse apportée
not getting plot , why?
Arrange it like this sigma=0.047193; V_tip=180; W=180; Cd_avg=0.01; R=2.235; k=1.1; A=pi*R.^2; P_e= 61147.4; h=0:100:...

plus de 5 ans il y a | 0

Réponse apportée
Solving a linear system of 1st order ODEs using the Forward Euler method and ode45
You were confusing time and x position. Try tf = 4; %final time You are integrating wrt time not x tspan = [0,tf]; h = .05;...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to show 1e-10 in plot? my y axis range is 1e-10 to 0.1.
doc semilogy

plus de 5 ans il y a | 0

Réponse apportée
How can I solve this ode problem?
You get a singularity (divide by zero) when u = 60, giving infinite acceleration. You need to include a guard against this.

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
My function f(x) doesn't display (compute?) the result for when f = 0.
Replace diff(g) by gradient(g)

plus de 5 ans il y a | 1

Réponse apportée
Taking a descend interval
Insert tau = n+1-t; then raise 1/800 to the power tau.

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Complex Sinwave to plot
Like this x = 0:0.1:4.56; p = zeros(1,numel(x)); q = zeros(1,numel(x)); for i = 1:numel(x) p(i) = fn(x(i)); q(i) =...

plus de 5 ans il y a | 0

Réponse apportée
Extreme difference between the value of a function and the result in matlab
Must hit an overflow. Express it as: a=sqrt(4950000001); b=30000; r = (a/b)^2; y1 = 333.75+r*(11*r - b^2 -121 - 2/b^4)+5.5*...

plus de 5 ans il y a | 1

Réponse apportée
How to calculate the projection of point onto a line
Try doc std

plus de 5 ans il y a | 0

Réponse apportée
Unable to perform assignment because the left and right sides have a different number of elements
Like this? % 1. Define Initial Conditions N = 50; % x_0 = 50*pi/180*randn(2,N); phi_0 = x_0(1,:...

plus de 5 ans il y a | 0

| A accepté

Charger plus