Réponse apportée
X = a strophoid x=a(t2-1)/(t2+1), y=at(t2-1)/(t2+1), a>0, t=[-a,a].how to build a curve y (x) on the specified view.(blue dotted with marker type square)
On your line 4. you left out a dot. You should have: y = a*t.*(-1+t.^2)./(1+t.^2); However this will only give you two...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
problem with randsample when array with one element
That's what it is supposed to return. Read the website: http://www.mathworks.com/help/stats/randsample.html which stat...

environ 10 ans il y a | 0

Réponse apportée
Column size mismatch error using pdist2
You have taken the transpose of 'condition1oder2' which gives it 36 columns. That's a no-no for 'pdist2'.

environ 10 ans il y a | 1

Réponse apportée
How can I insert a row in the middle of a matrix/vector?
Suppose you want to insert the column vector y in the column vector x starting at index ix. x = [x(1:ix-1);y;x(ix,end)]; ...

environ 10 ans il y a | 2

Réponse apportée
How to write the equivalent of an 'until loop' in matlab?
To reproduce the equivalent of repeat --- until in C, do this: b = true; while b do the loop computations ...

environ 10 ans il y a | 2

Réponse apportée
Calculating mixed partial derivatives of a function A(x,y)
syms x y f(x,y) = x*sin(y); d2fdxdy = diff(diff(f,x),y); % = cos(y) Another way is: syms x y diff(x*sin(...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
Please I need the codes to how I can solve a random linear system of size n x n, using the tic and toc statements to fi nd how the Matlab linear solver scales with the problem size n.
The "n by n random linear system" you ask about refers to a random square matrix A of size n by n, a random column vector, b, of...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Replace a zeros row with one under a condition very important for me
I'll just answer for your "First one" in getting "the same thing for the columns in A". Let x be a column in A. s = cumsum...

environ 10 ans il y a | 0

Réponse apportée
How to analyze a distribution parameters?
I fail to see what the difficulty is here. If x is a vector containing all the values of the parameter in question, then y is a...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
Hi, how do I compute f(x) = tan(x) at x=1 using the forward difference and the central difference. Using also h = 10^(-k), where k= 0,1,2,....,16.? I already did this but not too sure if it is correct.
You should beware of carrying out this computation as far as h = 10^(-16). Matlab's computation of 'tan' is only accurate to ab...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
how to convert from column to row ?
B = A.';

environ 10 ans il y a | 20

| A accepté

Réponse apportée
Matlab Busy since four hours
Your method of appending columns to 'Result_matrix' is very time consuming. Also as Geoff points out, your creation of a new 'z...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
function to calculate summation in matrix
Instead of inserting ones into a pre-existing A of zeros, it is easier to generate A from scratch: A = []; for k = 1:s...

environ 10 ans il y a | 0

Réponse apportée
Turn imaginary numbers to complex
Your statement *"my Eigen values (l) are not of the form alpha+beta*i"* really isn't correct. They are both of that form where ...

environ 10 ans il y a | 0

Réponse apportée
I am trying to create a program in MATLAB that uses a while-loop to calculate the product of the values of all the elements of A when A=[10,11,12,13,14,15,16,17,18,19]. So far I have the following program:
If you are required to use a loop rather than a vectorized method, you can do this: f = 10:19; product = 1; for k ...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Epsilon close solution to a trigonometrical system of equations.
The problem here is that you have more unknowns than equations. In such a case there is generally an infinite continuum of poss...

environ 10 ans il y a | 0

Réponse apportée
I do not understand why my k value won't increase to 3. Is there an error in my logic?
Your condition "del_z == lt*k" is too demanding. Your computer is using binary numbers to approximate decimal fractions. When ...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
how to draw circle with different radii in scatter plot?
Let P1 = [x1,y1], P2 = (x2,y2), and P3 = [x3,y3] be your three points. Then, interpreting your word 'intercepts' as meaning tha...

environ 10 ans il y a | 0

Réponse apportée
I have a data set of 400 columns and 644rows .I need to select columns 1,2,11,12,21,22,.....381,382,391,392 or move these particular columns in to a matrix.how can i write code for this in matlab
If M is the matrix with 400 columns, and if M2 is the matrix to be obtained from it, do this: n = 400; M2 = M(:,mod((1...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
Replace certain matrix values with zeroes (more complex than other similar questions)?
Let 'A' be your original matrix and 'G' be the goal matrix. m = size(A,1); n = sum(s); G = repmat(A,n,1); c = ...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
Length of intersection segment.
This is the problem that led to the classical problem of elliptic integrals. However, you can solve your problem numerically us...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
merging column elements into one
You can easily compress seconds, minutes, hours, days of the month, months, and years into one double precision floating point n...

environ 10 ans il y a | 0

Réponse apportée
How can I solve this equation and do not get RootOf in my answers?
There is a theorem in mathematics known as the Abel-Ruffini theorem that states that there is no explicit formula for general qu...

environ 10 ans il y a | 1

| A accepté

Réponse apportée
why matlab is unable to solve these set of equations?
My suggestion would be to help out Matlab's 'solve' a little by the way the problem is approached. The sixth, seventh, and eigh...

environ 10 ans il y a | 2

| A accepté

Réponse apportée
i have array cv which contains 16 rows & 2 columns. i need to find index of any one column. for ex, ans=2 or ans=1. i tried the following code. but it doesn't give the correct answer.please send the code.thank u sir.
I think what you meant to do is: ind = find(cv(:,z) == 2); % Gives indices of each element in column z which equals 2

environ 10 ans il y a | 0

Réponse apportée
Help with calculating median of an array without using built in function?
Next step: n = length(b); t = (n+1)/2; md = (b(floor(t))+b(ceil(t)))/2; % <-- median

environ 10 ans il y a | 1

| A accepté

Réponse apportée
Finding a variable in a equation
The following obtains a least squares value for K: K = y/(exp(x/25)-1); I am assuming x and y are still row vectors her...

environ 10 ans il y a | 0

Réponse apportée
How to get smith form of a matrix in matlab
Use 'smithform' only in mupad. See <http://www.mathworks.com/help/symbolic/mupad_ref/linalg-smithform.html>

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Matrix Dimension must agree..
The error message is telling you what the trouble is. The vector x(i,:) has 1000 elements for each 'i', but p(i,:) was input an...

environ 10 ans il y a | 0

| A accepté

Charger plus