답변 있음
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...

대략 10년 전 | 0

답변 있음
Using the floor function to separate numbers
Your mistake occurs at the line: secondary = (initial - initial2)*10; You should have written Secondary = k - ini...

대략 10년 전 | 1

| 수락됨

답변 있음
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 ...

대략 10년 전 | 0

| 수락됨

답변 있음
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...

대략 10년 전 | 0

답변 있음
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...

대략 10년 전 | 1

| 수락됨

답변 있음
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...

대략 10년 전 | 0

| 수락됨

답변 있음
How to reassign matrix if it is greater than some value quickly
M = a; M(M<b) = 0; M is your answer.

대략 10년 전 | 0

| 수락됨

답변 있음
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) = ...

대략 10년 전 | 1

답변 있음
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...

대략 10년 전 | 0

답변 있음
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: ...

대략 10년 전 | 0

| 수락됨

답변 있음
Remove certain elements from a matrix
Or you just write: NewData = OldData(OldData(:,2)==0,:);

대략 10년 전 | 0

답변 있음
How to add specific rows that meet a condition?
N = 1:26; C =sum(bsxfun(@times,bsxfun(@le,A,N),B));

대략 10년 전 | 0

답변 있음
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...

대략 10년 전 | 0

답변 있음
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...

대략 10년 전 | 1

| 수락됨

답변 있음
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...

대략 10년 전 | 0

답변 있음
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...

대략 10년 전 | 0

답변 있음
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); [~,...

대략 10년 전 | 1

| 수락됨

답변 있음
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)

대략 10년 전 | 1

답변 있음
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 ...

대략 10년 전 | 1

답변 있음
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...

대략 10년 전 | 0

| 수락됨

답변 있음
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. ...

대략 10년 전 | 0

답변 있음
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 ...

대략 10년 전 | 0

답변 있음
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...

대략 10년 전 | 0

| 수락됨

답변 있음
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...

대략 10년 전 | 0

| 수락됨

답변 있음
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...

대략 10년 전 | 0

답변 있음
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...

대략 10년 전 | 0

답변 있음
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 ...

대략 10년 전 | 1

| 수락됨

답변 있음
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. ...

대략 10년 전 | 1

답변 있음
Adding multiple elements from an array
A(1:9:55) = 0; v = sum(A,1);

대략 10년 전 | 0

답변 있음
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...

대략 10년 전 | 0

| 수락됨

더 보기