Respondida
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-...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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 ...

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 1

| aceptada

Respondida
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) %...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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 ...

más de 11 años hace | 6

Respondida
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 ...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 1

Respondida
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?

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

Respondida
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)

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 0

Respondida
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 ...

más de 11 años hace | 2

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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)

más de 11 años hace | 15

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
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])...

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 2

| aceptada

Cargar más