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

mehr als 11 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 11 Jahre vor | 2

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 3

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 21

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 0

| akzeptiert

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

mehr als 11 Jahre vor | 1

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

mehr als 11 Jahre vor | 0

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

mehr als 11 Jahre vor | 0

| akzeptiert

Mehr laden