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

casi 11 años hace | 0

| aceptada

Respondida
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

casi 11 años hace | 2

| aceptada

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

casi 11 años hace | 0

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

casi 11 años hace | 0

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 1

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 1

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 1

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

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

casi 11 años hace | 3

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 20

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 1

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

casi 11 años hace | 0

| aceptada

Respondida
import constants to simulink
Ameen, a standard approach is through callbacks. In your Simulink model go to > File > Model Properties > Model Properties, navi...

casi 11 años hace | 1

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

casi 11 años hace | 0

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

casi 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 1

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

alrededor de 11 años hace | 0

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

alrededor de 11 años hace | 0

| aceptada

Cargar más