Beantwortet
Numel error cant figure out why
It looks as though the exact equality demanded by "==" never occurred and so the 'break' did not happen, but your value of 'poin...

mehr als 11 Jahre vor | 1

Beantwortet
svd prescision is very bad.
You cannot expect them to be exactly the same because of rounding errors. Have you compared them using "format long" to see how...

mehr als 11 Jahre vor | 2

Beantwortet
does mldivision have any exceptions? I used it to solve an equation and the values I got were wrong.
You mustn't use "==" to check your answers because that doesn't allow for round-off errors. I checked the answers you obtained ...

mehr als 11 Jahre vor | 1

Beantwortet
what is meant by the following error and how correct it?
My guess is that somewhere in your code you have used the string 'length' as a variable and that is what matlab interprets 'leng...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
Do not understand why my code isn't working!
The third argument in 'linspace' is interpreted as the number of desired points, so you will get at most one point in each one. ...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
I am confused with scalars!!!
Apparently your variables 'mi', 'ma', 'a1', 'b1', ..., are arrays with more than one element - that is, they are not scalars. C...

mehr als 11 Jahre vor | 5

| akzeptiert

Beantwortet
Recursively generating permutation matrices
The following generates every possible matrix M satisfying your requirements. Moreover they don't need testing, since every one...

mehr als 11 Jahre vor | 2

Beantwortet
How can i get the index of the submatrix D, that correspond to the maximum determinant?
A = randn(2,4);%this will give me a 2rows by 4columns matrix b = 0; for i=1:1:4 for j=(i+1):1:4 b=b+1; D=[...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
(Optimization) How to quickly get coordinates (coordinates are integer) of all possible points inside a specific cylinder?
The hard part of your question is formulating the equations of the cylinder's bounding surfaces. If P1 = [x1,y1,z1] and P2 = ...

mehr als 11 Jahre vor | 3

| akzeptiert

Beantwortet
how do i get rid of the fractions on array calculations
You need to proceed differently in your for loops. n = 631; for ix = 1:n X = .1*(ix-1)+1; for iy = 1:n ...

mehr als 11 Jahre vor | 2

Beantwortet
Why is the code not implementing for i==6 value ?
I see one apparent error. The condition (i==1 i==7) will never be true. You need an 'or' symbol in it: (i==1 | i==7). Also ...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
Help with a System of linear inequalities (with 12 variables)
I can give you one hint. Consider one of the equations, say, the last one: I = 18 - J - K We know that the sum J+K can...

mehr als 11 Jahre vor | 0

Beantwortet
Integrate symbolic function & maintain constants in solutions
As I mentioned to you yesterday, you are unlikely to get a symbolic answer from 'int' as a function of a1, a2, and a3, because ...

mehr als 11 Jahre vor | 2

Beantwortet
Symbolic matrix algebra calculation
If you use the form a = sym('a',n) or a = sym('a',[m.n]) to declare symbolic vectors or matrices, I seriously doubt that the ord...

mehr als 11 Jahre vor | 2

Beantwortet
Double numeric integral of a function help please
You need to make the integration limit sqrt(1-x^2) a function handle. See the documentation at http://www.mathworks.com...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
how can i get x/y to be on the left of the equation a = x - b* y ?
y/x = (x-a)/(b*x) Note: There is no way you can solve for y/x entirely in terms of a and b. It isn't uniquely determined...

mehr als 11 Jahre vor | 0

Beantwortet
Integrate symbolic expression while maintaining constants
Unless I am mistaken, that integrand gives rise to an elliptic integral, and probably 'int' is unable to express its integral in...

mehr als 11 Jahre vor | 1

Beantwortet
How do I get formula for the nth term of this on matlab?
Since I made an error in my first answer, here is a bit more information. The problem can be expressed this way: x(1) = s...

mehr als 11 Jahre vor | 1

Beantwortet
How do I get formula for the nth term of this on matlab?
It doesn't matter what you initialize it at, the limit as n approaches infinity is always 2, not 3. Correction: You were rig...

mehr als 11 Jahre vor | 1

Beantwortet
Tricky formula with cumulative sum
To use 'cumsum' you need to get the u's out of the squared expression. Let's assume X and u are row vectors. Y = cumsum(X.^...

mehr als 11 Jahre vor | 2

| akzeptiert

Beantwortet
Vectorize my code in azimuth calculation.
You could try this. It calls on 'azimuth' in the same sequence as in your for-loop code, but it is vectorized. Whether it is f...

mehr als 11 Jahre vor | 0

Beantwortet
I have 4 values of B corresponding to 4 values of A. I need 100 values of B for 100 values of A. There is no well defined interval between two values of A but values of A are within the range 0.049317 to 0.160588. Can anyone help me to find out
With just four pairs you just as well use a Lagrange interpolating polynomial. In your case it would be a cubic. It has no req...

mehr als 11 Jahre vor | 0

Beantwortet
how can I evaluate a four fold integral with four variables numerically ?
Set up a function which, when given the value of the outermost variable of integration, calculates the triple integral of the in...

mehr als 11 Jahre vor | 2

Beantwortet
How I can integrate symbolically a function of probability?
To get the proper answer you need to extend the range of x over which f1(x) is defined. When you run int(f1(x),x,0,1), the 'int...

mehr als 11 Jahre vor | 0

Beantwortet
hamming distance in one matrix
B = [10100100010001001; 01110010100110010; 10000100001000111; 11100011111000011]; D = pdist...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
Please clarify this statement?
Read about the 'colon' operator here: http://www.mathworks.com/help/matlab/ref/colon.html and the 'end' array index her...

mehr als 11 Jahre vor | 0

Beantwortet
Need help to solve and plot implicit diode equation
@Abhi. The explicit solution for I in the equation Il-Io+exp(q*(V+I*R)/(n*k*T))-(V+I*R)/S = I which I obtained using m...

mehr als 11 Jahre vor | 1

Beantwortet
Need help creating matrix (Easy)
M = reshape((1:7)'*(1:5),1,[]);

mehr als 11 Jahre vor | 0

Beantwortet
Help writhe a fixed point algorithm
This problem is ideal for using matlab's 'while' function. You can read the details about it at: http://www.mathworks.com...

mehr als 11 Jahre vor | 1

| akzeptiert

Beantwortet
Hi I tried to run the following and it keeps giving me the following. Can somebody help me fix it.
The problem here is that inv(xn'*xn)*xn'*y has two elements in a size 2 x 1 vector, while you are trying to place them in a sing...

mehr als 11 Jahre vor | 1

| akzeptiert

Mehr laden