답변 있음
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*...

거의 5년 전 | 1

| 수락됨

답변 있음
Return the value of Matrix
mat_c(:,2)

거의 5년 전 | 1

| 수락됨

답변 있음
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.

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

답변 있음
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,:)];

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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(...

거의 5년 전 | 1

답변 있음
how can I interpolate functions
doc interp1

거의 5년 전 | 0

답변 있음
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; ...

거의 5년 전 | 0

답변 있음
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.

거의 5년 전 | 0

| 수락됨

답변 있음
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....

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 1

| 수락됨

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
Integral Not Calculating Numeric Result
Replace q = int(F,1,2) by q = int(F,1,2,'IgnoreAnalyticConstraints',true)

거의 5년 전 | 0

| 수락됨

답변 있음
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.

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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) = ( (...

거의 5년 전 | 0

| 수락됨

답변 있음
Error when solving differential equations
Your function has function dydt = vdpi1(t,y) but you really want dy returned, not dydt.

거의 5년 전 | 0

답변 있음
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:...

거의 5년 전 | 0

답변 있음
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;...

거의 5년 전 | 0

| 수락됨

답변 있음
How to show 1e-10 in plot? my y axis range is 1e-10 to 0.1.
doc semilogy

거의 5년 전 | 0

답변 있음
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.

거의 5년 전 | 1

| 수락됨

답변 있음
My function f(x) doesn't display (compute?) the result for when f = 0.
Replace diff(g) by gradient(g)

거의 5년 전 | 1

답변 있음
Taking a descend interval
Insert tau = n+1-t; then raise 1/800 to the power tau.

거의 5년 전 | 0

| 수락됨

답변 있음
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) =...

거의 5년 전 | 0

답변 있음
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*...

거의 5년 전 | 1

답변 있음
How to calculate the projection of point onto a line
Try doc std

거의 5년 전 | 0

답변 있음
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,:...

거의 5년 전 | 0

| 수락됨

더 보기