Réponse apportée
How to add text in plot?
delila, use the |text| command. See the <http://de.mathworks.com/help/matlab/ref/text.html documentation> for reference.

environ 11 ans il y a | 0

| A accepté

Réponse apportée
How to returns combined data from a single vector with no repetitions?
Not quite sure what you are trying to do. Do you mean: A = [1 2 2 3 3 3]; B = unique(A) B = 1 2 3

environ 11 ans il y a | 2

| A accepté

Réponse apportée
how do you plot signal like cos wt and 1/4 cycle time delayed version of signal on same axis
Amit, how about x = 0:0.01:2*pi; y = cos(x); yd = cos(x + pi/2); plot(x,y,x,yd)

environ 11 ans il y a | 0

Réponse apportée
How can I derive solution in matrix form?
Hello Junsoo, what relevance has |eqn| in computing |y| as a function of |x|? In general, you need to use the dot notation w...

environ 11 ans il y a | 0

Réponse apportée
'@' how to use this?
Victor, does this help? fh = @(x,y) x.*y.^2; fh(3,2) ans = 12 The example above shows a function handle for an a...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
find minima in 3D function/matrix
Joachim, use instead [r,c] = find(Z==MinV) % gives two arguments r = 28 14 c = 14 28 which will a...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
How to use subs with sym
hadi, you need to define |x| as a symbolic variable syms x y f = @(x,y) x^2 + y; f = sym(f); out = subs(f,x,2) out...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Differentiation of Z, Symbolic toolbox?
Timothy, looks like you do not have access to the Symbolic Math Toolbox. See this <http://www.mathworks.com/matlabcentral/answer...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Clarifications on using dsolve
Hirak, one simple way would be to add another initial condition (first derivative) f = dsolve('D2y + y = 0','Dy(0) = 1','y(0...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
why is my results coiming out as a single 0 while using matlab
|R| is a vector, |P| is a scalar. Do you mean to do R = rand (10,1)% generate a sample in Unif(0,1) P = 0.5; N = 10; for...

environ 11 ans il y a | 1

| A accepté

Réponse apportée
partial differential for nonlinear equation
Use |gradient| syms X Y Z Eq = -31.65951 + sqrt((20460991.052399-X)^2+(11012393.207537-Y)^2+(13140061.841029-Z)^2)-sqrt((...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
how would i plot upper half of an ellipse in matlab using standar form?
With a bit of math, solve for |y| a = 2; b = 3; x = -a:0.1:a; y = sqrt(b^2 - b^2*(x.^2/a^2)); plot(x,y)

environ 11 ans il y a | 1

Réponse apportée
Matlab Summation Cosine Sine operator
Correct. |b| is an array (e.g. vector). The command applies the sine to all the components of |b| and then sums all those sine t...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
what is the syntax to implement natural logrithamic function (ln) into coding
The natural log is simply |log| tim = (x/z)*log(u);

environ 11 ans il y a | 0

Réponse apportée
Is it possible to multiply Matrices which contains variables?
Yes, it is. Symbolically (showing it for 2x2): syms a b c d e f g h mat1 = [a b; c d]; mat2 = [d e; f g]; mat3 = mat...

environ 11 ans il y a | 3

| A accepté

Réponse apportée
Random number of nested for loops
Hadi, without any further requirements on output data type, etc., how about myarray = dec2bin([0:2^N-1],N-1)

environ 11 ans il y a | 0

| A accepté

Réponse apportée
How can i display symbolic expressions using decimals instead of rational fractions?
Dennis, you could use something like vpa(strain,5)

environ 11 ans il y a | 21

| A accepté

Réponse apportée
'int2str' - like operator for a symbolic matrix element
Do you mean, e.g. mystring = char(Cs(1))

environ 11 ans il y a | 0

| A accepté

Réponse apportée
??? Undefined function or method 'power' for input arguments of type 'function_handle'.
Suj, two things: |root| and |Zed| are not defined. In x1 = y - (z1(z)/dz(z)); the running index is probably |u|, and not...

environ 11 ans il y a | 1

Réponse apportée
Numerical instability of spherical pendulum
Bas, the plus sign in your equation does look a bit strange. Shouldn't that be a minus instead?

environ 11 ans il y a | 0

| A accepté

Réponse apportée
import constants to simulink
Ameen, a standard approach is through callbacks. In your Simulink model go to > File > Model Properties > Model Properties, navi...

environ 11 ans il y a | 1

Réponse apportée
How to plot a shaded range between a min and max y value for the same x value
Oliver, something like this? t = 0:0.1:10; y1 = sin(t); y2 = sin(t + 0.1) + 0.5; y3 = cos(t).^2; y4 = cos(t + 0.2)....

environ 11 ans il y a | 0

Réponse apportée
Why function sym and syms dont work in R2012b?
Nikola, you probably don't have the Symbolic Math Toolbox installed/licensed. To check use ver to list all installed too...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Question about mouse click on figure
This code snippet should get you started: button = 1; getpt = 1; [x,y,button] = ginput(1); XY = [x y]; wh...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Plotting orbits of 3 ODE system
pj93, use something like function myorbit() x0 = [1 1 1]; tSpan = [0 10]; a = 1; b = 1; c = 1; I ...

environ 11 ans il y a | 0

Réponse apportée
Get the mean of the matrix and extract the elemnts fromthe matrix that are greater than the mean
How about ouput = C(C<mean(C))

environ 11 ans il y a | 0

| A accepté

Réponse apportée
Need help on using ODE45
John, your code is good. Is the code above all contained within *one* file with name |crosscatalator.m|? If so, try at the MA...

environ 11 ans il y a | 0

| A accepté

Réponse apportée
How to use functions in matlab
Shinjin, your function is probably residing whithin a script, correct? If so, copy-paste the function into a new function window...

environ 11 ans il y a | 1

Réponse apportée
Two matrix subtraction with each of different dimension
Pankaja, in general, you can only subtract matrices of equal size. What would you like to see happening?

environ 11 ans il y a | 0

Réponse apportée
Matlab symbolic variables depending on time "t" and call of symbolic vector elements
Mohamed, to your first question: use instead Y = [0 cos(theta1);1 sin(theta2)] * [x; y] % note the last semi-colon Y = ...

environ 11 ans il y a | 0

| A accepté

Charger plus