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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 2

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

fast 11 Jahre vor | 0

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

etwa 11 Jahre vor | 1

| akzeptiert

Beantwortet
how to find all integers between two integers
Another hint: Check out the 'circshift' function.

etwa 11 Jahre vor | 1

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 0

Beantwortet
converting numbers to matrix(matrix formation)
Use the 'reshape' function.

etwa 11 Jahre vor | 1

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 2

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

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

etwa 11 Jahre vor | 1

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 0

| akzeptiert

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

etwa 11 Jahre vor | 1

| akzeptiert

Mehr laden