Réponse apportée
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-...

presque 12 ans il y a | 0

Réponse apportée
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...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 12 ans il y a | 0

| A accepté

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

presque 12 ans il y a | 0

Réponse apportée
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...

presque 12 ans il y a | 1

| A accepté

Réponse apportée
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) %...

presque 12 ans il y a | 0

Réponse apportée
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...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 12 ans il y a | 6

Réponse apportée
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 ...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 1

Réponse apportée
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?

environ 12 ans il y a | 1

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

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

environ 12 ans il y a | 0

Réponse apportée
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)

environ 12 ans il y a | 1

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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 ...

environ 12 ans il y a | 2

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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)

environ 12 ans il y a | 15

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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...

environ 12 ans il y a | 0

Réponse apportée
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])...

environ 12 ans il y a | 0

| A accepté

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

environ 12 ans il y a | 1

| A accepté

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

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 12 ans il y a | 2

| A accepté

Charger plus