답변 있음
How to plot a large data set with markers to differentiate two overlapping lines?
How about plotting every n points. For example plot(t(1:1000:end),n_d(1:1000:end),'o') hold on plot(t(500:1000:end),n_r(500:...

대략 5년 전 | 0

| 수락됨

답변 있음
there is also a mistake here i can't recognize it , please help
You need N = [-V3*cos(th3(ii))-40*W2(ii).^2*cos(th2(ii))+C(ii)*W3(ii).^2*cos(th3(ii))+V3*W3(ii)*sin(th3(ii)); V3*sin(t...

대략 5년 전 | 0

답변 있음
How to vectorize this function?
You need a ./ (i.e. dot /) x3=@(phi) (R-((3-2.*sin(phi))./(1-0.5.*sin(phi)).*R)/4).*cos(phi) ...

대략 5년 전 | 0

답변 있음
Plotting graph with Alpha and spectral radius
It works if you set i = 0.1:0.1:10. With i = 0; the inverse of S is full of Inf's.

대략 5년 전 | 0

| 수락됨

답변 있음
Conditional with time in ode45
Include upsilon within the odefcn mu = 6.25e10^-3; eta = 6.25e10^-3; beta = 0.03813350836; gamma = 0.01165323939; delta = 1...

대략 5년 전 | 0

| 수락됨

답변 있음
what's wrong with this code. why it show error can anyone tell?
You probably want something like this (don't enclose it with the statement 'function matlab' - that won't work). Remember to in...

대략 5년 전 | 0

답변 있음
Plot with 2 parameters
Do you mean something like this: theta = -90:90; ri = 0.5; ro = 1.5; x = [ri*cosd(theta) ro*cosd(-theta) 0]; y = [ri*sind(th...

대략 5년 전 | 1

답변 있음
Please, how can I solve runKut4 in line 6?
Try t = 0.0; tStop = 6.0; y = [1.5 0]; h = 0.1; [T,Y] = ode45(@dEqs,[0 tStop],y); plot(T,Y(:,1),'ko-') xlabel('time (s)')...

대략 5년 전 | 0

| 수락됨

답변 있음
ode45 function matrix dimensions problem
You need to loop through the Y_H values. See below global mu_H Ks X_BH teta Ss_in mu_Hmax=0.15; %days^-1 T=22.6; %centigrad...

대략 5년 전 | 0

답변 있음
I am getting this error "Assignment has more non-singleton rhs dimensions than non-singleton subscripts". Please help. Mw, Cw and Kw are 243X243 matrices.
It gets past your indicated Error line for me, but fails because you haven't defined Mw, Cw or Kw.

대략 5년 전 | 0

답변 있음
Error: Unable to perform assignment because the left and right sides have a different number of elements.
There are a lot of missing indices and definitions. In the following the indices are repaired; however, you will need to define ...

대략 5년 전 | 0

| 수락됨

답변 있음
Grading system in excel sheet based on marks
Shouldn't you have for i = 1:1:N if R(i)>=80 table.StudentGrade{i} = 'A'; elseif R(i)>=70 table.StudentGrade{i} = 'B...

대략 5년 전 | 0

답변 있음
2D cylindrical boundriondition problem
It looks like vr = 0.8:hr:0.2; is the cause of the problem. This leads to vr being empty!

대략 5년 전 | 0

답변 있음
I am trying to modulate the carrier with Gaussian pulse using frequency modulation. I tried to write this code. Can any one help is it correct, if not please can you help me in this regard. Thanks
Don't put a space between dot and ^ or dot and *. Also use figure, not figures. Try the folowing f = 12e12; % carrie...

대략 5년 전 | 0

| 수락됨

답변 있음
problem with Euler's explicit methode
Because you have initial values of zero for L0=0;M0=0;Z0=0;N0=0; and they multiply the terms on the right-hand side of your f...

대략 5년 전 | 0

| 수락됨

답변 있음
Matrix dimensions must agree.
This works % n all alpha beta gamma min max d=[1 550 8.1000 0.00028 0 680 2 309 8.1000 0.00056 0 360 3 307 8.1000 0.00...

대략 5년 전 | 0

| 수락됨

답변 있음
When I attempt to run this code, it doesnt stop running. It will only stop when I pause it. Would appreciate any help as to how to fix this?
Your pressure goes negative just after a catalyst weight of 5 kg. Should it do this? Perhaps your equations should be double-c...

대략 5년 전 | 0

답변 있음
writing and plotting function with multiple conditions
One possibility: f = @(x) 9/5*x*(0<=x & x<1/2)+9/5*(1-x)*(1/2<=x & x<=1); e.g. f(0.1) ans = 0.1800 >> f(0.75) ...

대략 5년 전 | 0

| 수락됨

답변 있음
Why is my plot figure blank?
You only calculate a single value of B. Presumably the x and y values should vary with nu somehow, but you don't specify how!

대략 5년 전 | 0

답변 있음
design of journal bearing
Here's an example for l/d = 1/4. Note that because the S scale is logarithmic, it's best to interpolate logarithmically: S...

대략 5년 전 | 0

답변 있음
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. how do I solve the problem?
Replace x_d(i)=[2*sin(2*t(i));4*cos(3*t(i))]; by x_d(:,i)=[2*sin(2*t(i));4*cos(3*t(i))]; Similarly for the others.

대략 5년 전 | 0

| 수락됨

답변 있음
Multiplying vectors resulting in unfinished answer
Use a./b not a/b for element by element division.

대략 5년 전 | 0

답변 있음
Finding 0 in data for n X 2 array
Here's one way: ix = (M(:,1)+M(:,2))==0; M(ix,:) = [];

대략 5년 전 | 1

답변 있음
solve multipe eq in a loop
Your equations are linear in p (p2 to p9, that is, since p1 is constant for all times), so the following is a simple way to solv...

대략 5년 전 | 0

답변 있음
Evaluating a 2nd order ODE using the Runge-Kutta method
More like this: a = 0; b = 1; %n = input('Enter the number of intervals:'); n = 100; h = (b-a)/n; y = [2; -2]; t = 0:h:...

대략 5년 전 | 0

| 수락됨

답변 있음
How to solve this equation with matlab
Strange way of entering data! However, one way to find the friction factor is a simple fixed point iteration method, such as e...

대략 5년 전 | 0

답변 있음
please help me with this
Simply insert hold xvals = [0 7.2 7.2]; yvals = [0.36 0.36]; plot(xvals,yvals,'--') after your plot command (though the pea...

대략 5년 전 | 0

답변 있음
Equation of 3D motion with V, An, R
A little more like this perhaps, since you are given explicit expressions for velocities and accelerations (though note that ax ...

대략 5년 전 | 0

답변 있음
Need Help Solving a system of 2nd and 1st Order ODEs
I think you should be passing only 5, not 6, parameters to your mysys function, which is better written as function dy = mysys(...

대략 5년 전 | 2

| 수락됨

더 보기