답변 있음
how can i slice the symbolic function converted with matlabfunction?
Moein, this seems to be a duplicate of your other <http://www.mathworks.de/matlabcentral/answers/156927-how-can-i-use-slice-for-...

11년 초과 전 | 0

답변 있음
how can i use slice for symbolic functions?
Moein, most likely you can use |<http://www.mathworks.com/help/symbolic/matlabfunction.html matlabFunction>| to convert the symb...

11년 초과 전 | 0

| 수락됨

답변 있음
subtract different column by different number
Patrick, use |bsxfun|: A = [1 2 10; 1 4 20; 1 6 15]; A A = 1 2 10 1 4 20 1 6 15 ...

11년 초과 전 | 0

| 수락됨

답변 있음
Determine where lines intersect
Hello Andreas, use |ode events|. <http://www.mathworks.com/help/matlab/math/ordinary-differential-equations.html#f1-669698 This ...

11년 초과 전 | 0

답변 있음
why do i get the error: matrix dimensions must agree ??
Maria, use y = 1./(abs(a*x) + 1); instead. Notice the dot right after the "1". This so-called elementwise division is nec...

11년 초과 전 | 1

| 수락됨

답변 있음
How to draw curves in a contour plot
Simon, use hold on before the second plot command. E.g. x = 0:0.1:2*pi; y = sin(x); z = cos(x); plot(x,y) %...

11년 초과 전 | 0

답변 있음
fprrintf MATLAB R2013a not working
Yasmine, use fid = fopen('Code.txt','w'); fprintf(fid,'start a new cycle \n'); fprintf(fid,'t = %0.5f\t total_diss %0.5f...

11년 초과 전 | 0

| 수락됨

답변 있음
How to plot a surface which is perpendicular to xy-plane
Mary, use [Y,Z] = meshgrid(-5:5,-5:5); X = Y.*(Y - 2); surf(X,Y,Z) in other words, simply use |Y| and |Z| as the ...

11년 초과 전 | 6

답변 있음
How to find the point in a plot that indicate to the beginning of a curve?
Meshooo, you could use something like x = 0:0.1:10; y = sin(x); plot(x,y) xp = min(x(diff(y)<0)) |diff| computes ...

11년 초과 전 | 0

답변 있음
How to use gplot function given a matrix?
Sharif, check out the example below Cor = [2 2; 1 -1; -3 -3; -1 1]; A = [0 1 0 1;... 1 0 1 1;... 0 1 0...

11년 초과 전 | 1

답변 있음
How to add date and time in a plot by command in matlab?
Vishnu, you could add to your function or script text(0,0,datestr(clock)) Would that do the trick?

11년 초과 전 | 1

답변 있음
need help finding convergence
Tony, this should get you started: g = @(x) tan(exp(x/20)); my_tol = 1e-5; x = 1; dx = x; x_iter = x...

11년 초과 전 | 0

| 수락됨

답변 있음
Help my code won't run for finding the minimum and maximum of a function
Cakey, |critpt_1| and |crit_pt_2| are only defined locally, in function |quadratic|. Also, the function does not seem to be comp...

11년 초과 전 | 0

| 수락됨

답변 있음
simdriveline in classroom version
Hello Varrel, the Classroom license at your institution only includes those toolboxes that were purchased as part of that licens...

11년 초과 전 | 0

답변 있음
Help with a double plot
Use, |plotyy|: x = 1:6; y1 = [2 4 7 3 5 6]: y2 = [25000 56000 78000 32000 78000 39000]; plotyy(x,y1,x,y2)

11년 초과 전 | 1

답변 있음
ODE45: small time-step size
Shayan, as indicated in the equation above the heat equation is a <http://www.mathworks.com/help/matlab/math/partial-differentia...

11년 초과 전 | 0

답변 있음
Why does quatrotate() produce negative rotations?
Hello Dereck, there is a difference between a) rotating a reference frame (e.g. relative to a "fixed" vector) and b) rotating a ...

11년 초과 전 | 2

| 수락됨

답변 있음
First time user of Matlab having issues trying to plot: y=sin x/x on an interval -30<x<30.
Use x = linspace(-30,30,10001); and axis([-30 30 -1 1]) instead. Otherwise the code looks fine. That is, copy-pa...

11년 초과 전 | 0

| 수락됨

답변 있음
Question about using elements of an array for computation
Sri, I believe what you want to do is D = 1 - power(power(1-D0,n+1)-((N-N0)./Nc).*(n+1).*power((1-r./R1),m),1./(n+1)); N...

11년 초과 전 | 0

답변 있음
How to specify boundary conditions for solution of ODes
saheed, see e.g. syms R L C Uc(t) % Define first and second derivatives for Uc DUcDt = diff(Uc); D2UcDt2 = diff(U...

11년 초과 전 | 0

답변 있음
How can I plot two functions in the same graph?
Iris, use x = -3:0.1:3; f = x./10; g = cos(x); plot(x,f,x,g)

11년 초과 전 | 15

| 수락됨

답변 있음
ode solvers & loops for various values
Harley, you are looking for something called |events| in MATLAB. Check out the section <http://www.mathworks.com/help/matlab/mat...

11년 초과 전 | 0

답변 있음
Why is the dashed red line for the second plot in the following code not appearing when I run the code?
Manuel, use plot(m,pi*ones(size(m)),'--r') instead. The first and second arguments in the |plot| command should be vecto...

11년 초과 전 | 0

답변 있음
How to do a function of equations?
Jurgen, do you mean something like: eq1 = @(x) x(1)*x(2); eq2 = @(y) y(1) - 2; fun = @(z) [eq1(z); eq2(z)]; fun([3,2])...

11년 초과 전 | 0

| 수락됨

답변 있음
How to Plot a graph with restriction?
Mustahsan, what do you mean by restrict? Setting the plotting limits? Something like: xlim([pi, 2*pi])

11년 초과 전 | 1

| 수락됨

답변 있음
How to get polygon coordinates?
Vladimir, check out the |<http://www.mathworks.com/help/matlab/ref/ginput.html ginput>| command.

11년 초과 전 | 0

| 수락됨

답변 있음
why is my while loop only looping once?
Brandon, check out f = @(x)(1/x) - 37; a = 0.001; b = 0.1; root = a; if (f(a)>0 && f(b)>0) || (f(a)<0 && f(b)<0) er...

11년 초과 전 | 0

| 수락됨

답변 있음
How to make title function accept dynamic input
Use title(strcat('Graphical Display of Chuzymatics: ', subject)) which concetanates the two strings to be outputted as t...

11년 초과 전 | 0

| 수락됨

답변 있음
How to add color to plot/graph
Something like whitebg([r g b]) where |r g b| are the RGB values of the color, e.g., whitebg([1 0 0]) for red. A...

11년 초과 전 | 0

| 수락됨

답변 있음
how to convert sym to double?
Physiker, one approach is to convert the symbolic equation into a MATLAB function (handle) and then use |fsolve|. E.g. my_di...

11년 초과 전 | 2

| 수락됨

더 보기