Réponse apportée
How to add negative number to the and of rand function
What about x = [floor(10*rand(1,5)),floor(-9*rand)]; (Note: writing "round(rand(1,5)*9)" makes 0 and 9 half as probable...

presque 10 ans il y a | 0

Réponse apportée
Using the floor function to separate numbers
Your mistake occurs at the line: secondary = (initial - initial2)*10; You should have written Secondary = k - ini...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Double integral of 2 function products with limits in variables
You can move f(x) outside the inner integral and what remains of the inner integral can be expressed in terms of the cumulative ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Vectorize for-loop that changes overlapping parts of an array
It isn't perhaps that you have a for-loop that is slowing you down so much as that your loop is repeating the writing of ones so...

presque 10 ans il y a | 0

Réponse apportée
Intersection of two triangles
Just combine the 'polyxpoly' result with two applications of 'inpoly' to test if either set of triangle vertices lies within the...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Selecting points which belong to parallel planes
It's a matter of simple vector analysis. Let P0 = [x0,y0,z0] be some base point on your principal axis and let n = [nx,ny,nz] b...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How to reassign matrix if it is greater than some value quickly
M = a; M(M<b) = 0; M is your answer.

presque 10 ans il y a | 0

| A accepté

Réponse apportée
how to use fsolve function to solve the x, y equations without create another m. file?
I would recommend you reduce your system to one equation and one unknown by substituting "-b/a*x1+.5/a^2" for x2: f(x1) = ...

presque 10 ans il y a | 1

Réponse apportée
Whats wrong with my quadratic formula?
Apparently you are trying to see how many seconds the object in question would take to return to earth. The velocity equation i...

presque 10 ans il y a | 0

Réponse apportée
How can I traverse a circle while identifying given points?
Let P1 = (x1,y1), P2 = (x2,y2), P3 = (x3,y3) be the three points and their respective coordinates. Perform these computations: ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Remove certain elements from a matrix
Or you just write: NewData = OldData(OldData(:,2)==0,:);

presque 10 ans il y a | 0

Réponse apportée
How to add specific rows that meet a condition?
N = 1:26; C =sum(bsxfun(@times,bsxfun(@le,A,N),B));

presque 10 ans il y a | 0

Réponse apportée
compare Vector and matrix
n = size(B,1); B0 = [-Inf(n,1),B]; B1 = [B,Inf(n,1)]; A1 = repmat(A,1,size(B,2)+1); test = double((B0<A1)&(A1...

presque 10 ans il y a | 0

Réponse apportée
How to solve system Ax=0 under the constraint that sum(x)=1?
In order to have a nonzero solution to A*x = 0, the matrix A must be singular, that is, its determinant must be zero. If its ra...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Mahalanobis distance dimension question
The reason is that matlab must compute the covariance of the matrix X and then find the inverse of this covariance matrix in ord...

presque 10 ans il y a | 0

Réponse apportée
How to create a random data set from the possible values?
Let L be a column vector with eleven integers, each the count of the number of possible values in the corresponding set of the e...

presque 10 ans il y a | 0

Réponse apportée
How to Findthe permutation matrices that produce another matrix?
Let the matrices A and B be n x n with B a permuted version of the rows and columns of A. s = 1:n; I = eye(n); [~,...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
I would like to make an equation to solve t when T_max is equal to 450
It is simple division: t = 450/dot(OAe,cross(R,[0;0;1])); (<-- Corrected)

presque 10 ans il y a | 1

Réponse apportée
Subscripted dimension mismatch error dec2hex
The dec2hex(colordata(i,j),6) quantity is a string of at least six hex characters, and yet your are attempting to place it in a ...

presque 10 ans il y a | 1

Réponse apportée
Matrix is singular to working precision.
The matrix xx.^2 is indeed singular by its very nature, since its rows are all alike. When you write yy.^2 / xx.^2 you are aski...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Because the plot command does not work? Matlab calculate improper integrals?
The problem here is that (-1)^(1/3) has three different possible roots, namely: 1/2+1/2*sqrt(3)*1i, 1/2-1/2*sqrt(3)*1i, and -1. ...

presque 10 ans il y a | 0

Réponse apportée
How to find parameters of the following coefficient based on optimization tool?
Define the following sum of squares of differences: ew=[0.679 0.613 0.613 0.501 0.497 0.50 0.389 0.386 0.386 0.391 0.390 ...

presque 10 ans il y a | 0

Réponse apportée
Could someone please help me create a three-column array?
Here is my guess as to what you mean: M = [mean(measles,1).', mean(mumps,1).', mean(chickenPox,1).']; Each value in M is th...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Bit missing after circular shift
Your result can be accounted for if your A row vector is a string vector of 1's amd 0's except that its first element is a blank...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
cannot find explicit solution symbolic equation
You have what appears to be two equations but only one unknown, namely 'lamb1'. You might try listing 'lamb3' as a second unkno...

presque 10 ans il y a | 0

Réponse apportée
How to iterate through 4Th array dimension a summation over the first 3 dimensions
A = sum(reshape(S,3*3*4,181),1); This will give you a vector with 181 elements, each being the sum over all the first thre...

presque 10 ans il y a | 0

Réponse apportée
how to store the each values of x and y in the following loop so that i could plot graph x vs y ?
Change the two lines x=bc(1); y=bc(2); to: x(object)=bc(1); y(object)=bc(2); If 'stats' is large it ...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
how can i specify a parameter for each element of a random matrix?
Let Imin and Imax be n x m matrices in which Imin(i,j) is to be the lower limit for a(i,j) and Imax(i,j) its upper limit. ...

presque 10 ans il y a | 1

Réponse apportée
Adding multiple elements from an array
A(1:9:55) = 0; v = sum(A,1);

presque 10 ans il y a | 0

Réponse apportée
How to get a 3-D matrix out of my code.
doppler = repmat(reshape(frequency.',80,1,780),1,5512,1) .* ... repmat(reshape(c./(c+v_doppler.'),80,5512,1),1,1...

presque 10 ans il y a | 0

| A accepté

Charger plus