답변 있음
How to solve this code error in
The vector 're' has 2 elements and 'ne' has 3 elements, so the element-by-element multiplication re.*ne becomes meaningless. Ho...

거의 11년 전 | 0

| 수락됨

답변 있음
What is a vectorized way to calculate variance of an image patch
You do need to answer Walter's question. Here are two possibilities: 1) From your I = 560 x 560 x 3 array, each 8 x 8 x 3 bl...

거의 11년 전 | 1

| 수락됨

답변 있음
How to solve 5 equations with 5 unknowns
You can use 'solve' in the Symbolic Toolbox to solve them. My alternate method was in error. Just use 'solve'. It does very...

거의 11년 전 | 0

| 수락됨

답변 있음
How to calculate product of the odd positions and the sum of the even positions?
Big hint (almost a give-away): vec_in(1:2:end) is the vector of all odd-positioned elements.

거의 11년 전 | 1

답변 있음
keep first time a value appear in a colomn and replace following ones
B = (A==0); B = A + (B & cumsum(B)>1);

거의 11년 전 | 0

답변 있음
Center of Mass of a Tetrahedron
((x1+x2+x3+x4)/4,(y1+y2+y3+y4)/4,(z1+z2+z3+z4)/4)

거의 11년 전 | 1

답변 있음
how to seperate even or odd elements and make row vectors from a matrix
The only error I see is that your returned values are in reversed order. According to the statement of the problem you should h...

거의 11년 전 | 0

| 수락됨

답변 있음
another method to for loop
There is one obvious way to speed things up. Your test for ind(i)==ind(j) is totally unnecessary and can be eliminated, because...

거의 11년 전 | 0

답변 있음
Problem with for loop
You have interpreted the phrase "get an error of 0.01%" far too literally. What is clearly meant is to find the smallest n such...

거의 11년 전 | 1

| 수락됨

답변 있음
replace matlab function with algorithm
I have given you a pretty good hint four days ago at solving your problem in the #218267 Answers thread. Why don't you try usin...

거의 11년 전 | 0

답변 있음
can someone explain me this code please?
This looks like a misguided attempt to use trapezoidal approximation to find the integral of y = x^3 over an interval in x. The...

거의 11년 전 | 1

답변 있음
how to find overlapping circles in matlab
Two circles will overlap if and only if the distance between their centers is less than or equal to the sum of their radii.

거의 11년 전 | 2

답변 있음
To accept two numbers from the user and display perfect numbers between these two numbers.
As part of your procedure in identifying a perfect number you need to determine the sum of all the divisors of a given integer, ...

거의 11년 전 | 0

답변 있음
Taking derivative an array which is a numerical value with respect to another array
Here is a second order approximation to du/dx which should be somewhat more accurate than a first order approximation, and if u ...

대략 11년 전 | 1

| 수락됨

답변 있음
how to find all integers between two integers
Another hint: Check out the 'circshift' function.

대략 11년 전 | 1

답변 있음
calculation of slopes of 2 lines
If your lines are three-dimensional, the concept of "slope" loses its significance. To find the angle between the lines, you can...

대략 11년 전 | 0

답변 있음
plz help me with this error "Matrix dimensions must agree."
From your error message I would guess that the matrix created for i1 is of different size from that of i2, and consequently matl...

대략 11년 전 | 0

| 수락됨

답변 있음
if command for finding more than three identical numbers in a variable
You can devise your own test: if any(diff([0,find(diff(v)~=0),size(v,2)])>3) ...

대략 11년 전 | 0

답변 있음
how to find cosine angle known the end points of 2 linesegments
Using 'atan2' or 'atan2d' and cross product is more accurate for angles that are near zero or near pi (180 degrees.) a = a...

대략 11년 전 | 0

답변 있음
I need to solve an equation set :(
What you have here is the equivalent of 32 linear (scalar) equations in 32 unknowns. A (somewhat desperate) solution is to conv...

대략 11년 전 | 0

답변 있음
converting numbers to matrix(matrix formation)
Use the 'reshape' function.

대략 11년 전 | 1

| 수락됨

답변 있음
Need help writing a code
It would be easy to write the code for this problem, or even to just mention certain matlab functions that would do the job easi...

대략 11년 전 | 0

답변 있음
Intersection between line and circle+ values?
Let P1 and P2 each be two-element column vectors with the coordinates of two points on the line, let C be the column vector of t...

대략 11년 전 | 2

답변 있음
How can I use matlab to find the solution of an equation when equal to zero using variables without substituting with numbers?
That is what the 'solve' function of the Symbolic Toolbox endeavors to do. It is not always successful, but it capable of some ...

대략 11년 전 | 0

| 수락됨

답변 있음
Resultant of 3 Vectors - find value and degree
First figure out the two coordinates of each of the three vectors and then just add the three vectors element-wise to get the re...

대략 11년 전 | 0

답변 있음
General question about the precision of computations
First, you should understand that your computer uses binary digits, not decimal digits. If you are using double precision float...

대략 11년 전 | 1

답변 있음
it is a problem of data types ?
The problem here is that 'ctr' of v(ctr) is not the same size as whatever the output of 'fscanf' is at that point, so matlab doe...

대략 11년 전 | 0

| 수락됨

답변 있음
How i can create a n+1 column matrix from n column matrix?
It looks to me as if you need to use: b = nchoosek(1:5,4);

대략 11년 전 | 0

| 수락됨

답변 있음
How I use a parabola in the xy-plane as base curve for the cylinder?
For a hyperbola, x^2/a^2-y^2/b^2 = 1, replace the two lines for X and Y by: X = a*cosh(V); Y = b*sinh(V); For a par...

대략 11년 전 | 0

| 수락됨

답변 있음
Negative number in Matrix or for loop or vector
For the first question, you need to distinguish between index values and the values stored at those locations. The former must ...

대략 11년 전 | 1

| 수락됨

더 보기