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

11년 초과 전 | 1

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

11년 초과 전 | 2

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

11년 초과 전 | 1

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

11년 초과 전 | 2

| 수락됨

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

11년 초과 전 | 1

| 수락됨

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

11년 초과 전 | 5

| 수락됨

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

11년 초과 전 | 2

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

11년 초과 전 | 2

| 수락됨

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

11년 초과 전 | 3

| 수락됨

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

11년 초과 전 | 2

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

11년 초과 전 | 2

| 수락됨

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

11년 초과 전 | 0

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

11년 초과 전 | 2

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

11년 초과 전 | 2

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

11년 초과 전 | 1

| 수락됨

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

11년 초과 전 | 0

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

11년 초과 전 | 1

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

11년 초과 전 | 1

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

11년 초과 전 | 1

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

11년 초과 전 | 2

| 수락됨

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

11년 초과 전 | 0

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

11년 초과 전 | 0

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

11년 초과 전 | 2

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

11년 초과 전 | 0

답변 있음
hamming distance in one matrix
B = [10100100010001001; 01110010100110010; 10000100001000111; 11100011111000011]; D = pdist...

11년 초과 전 | 1

| 수락됨

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

11년 초과 전 | 0

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

11년 초과 전 | 1

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

11년 초과 전 | 0

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

11년 초과 전 | 1

| 수락됨

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

11년 초과 전 | 1

| 수락됨

더 보기