답변 있음
Create/choose a rondom point from an existed data matrix?
I will give an answer in terms of a single triangle with vertices at P0, P1, and P2, (either in 2D or 3D.) Define r1 = ra...

대략 10년 전 | 0

| 수락됨

답변 있음
I ma trying to do Numerical Integration but getting an error
My guess is that somewhere in your code you have defined another function and given it the name 'integral'. Matlab is confused ...

대략 10년 전 | 0

답변 있음
for the prime number HW
Same answer as in http://www.mathworks.com/matlabcentral/answers/270893

대략 10년 전 | 0

답변 있음
for the prime number HW
In answer to the question "Why the for loop ends on sqrt(n) and not on (n)?", a number is not prime if and only if it has at lea...

대략 10년 전 | 2

| 수락됨

답변 있음
i have 4 columns of (256x4 double) type.
B = A(:,1:2)+A(:,3:4);

대략 10년 전 | 1

| 수락됨

답변 있음
Solving complex non-polynomial system of equations
If you square both sides of your two equations and then multiply the second equation by G+j*omega*C, you then have two polynomia...

대략 10년 전 | 0

답변 있음
How can I compute expression with an integral?
If the derivative with respect to t is taken of your equation, the result is a differential equation in the dependent variable r...

대략 10년 전 | 0

답변 있음
What is wrong with this loop?
My guess is that the outer for-loop which changes kn, starting from kn = 1 and ending with kn = 199 is causing unexpected result...

대략 10년 전 | 1

| 수락됨

답변 있음
Homework Help, Basic function
Though the statement of the problem doesn't appear to require a computation which uses these inputs, I would think doing so woul...

대략 10년 전 | 0

답변 있음
How can I generate `n' different sets of `f' unique random numbers between 1 and 120?
m = 120; % Choose m n = 4; % Choose n f = 5; % Choose f A = zeros(n,f); k = 0; while k<n for ix = k+1:...

대략 10년 전 | 0

| 수락됨

답변 있음
I would like to create a MATLAB code for this sum
To compute U(i,j) and L(i,j) for each pair i and j, you will presumably have to use matlab's 'fmincon' function in the Optimizat...

대략 10년 전 | 0

| 수락됨

답변 있음
poisson function help !
It's hard to understand what you are asking, but perhaps you need to call on the function 'poissrnd' which generates random inte...

대략 10년 전 | 0

답변 있음
I have a list of triangles of the mesh and point cloud. the question is :how to determine each point belongs to a triangle
Let the points (x1,y1), (x2,y2), and (x3,y3) be the three vertices of a triangle, and let (x,y) be some arbitrary point. Define...

대략 10년 전 | 0

| 수락됨

답변 있음
Matrix Indexing from an Array of Numbers
Assuming Z is a row vector Y2 = Y(:,bsxfun(@plus,Z,(0:4).'));

대략 10년 전 | 2

| 수락됨

답변 있음
Finding roots of a polynomial with guess and check.
r = roots([1,1,-2]);

대략 10년 전 | 0

답변 있음
Accuracy of solving a system
There is no hard and fast rule as to the number of significant digits in computations. It depends on the values and the nature ...

대략 10년 전 | 0

답변 있음
I need to make a set of 2000 random numbers between 0 and 1, with a mean of 0.5, with most of the numbers being either high or low (bimodal distrubution with peaks at 0 and 1)
t = 2*rand(1,2000)-1; x = (sign(t).*sqrt(abs(t))+1)/2; hist(x,20) This should approximate your two linear distribut...

대략 10년 전 | 1

| 수락됨

답변 있음
How i can program the following metrics in MATLAB
In the definition of P(j) you have j varying from 1 to n, and therefore j should be the first (row) index of X, X(j,i), and not ...

대략 10년 전 | 0

| 수락됨

답변 있음
How to save the output of matrix calculation with different dimension
Based on the fact that you appear to be seeking four index values, I am guessing that what you actually want are the maximum val...

대략 10년 전 | 0

| 수락됨

답변 있음
Construct a 2D matrix whose each element is the maximum among the receptive elements of multiple 2D matrices constructed by a 3D matrix.
[B,I] = max(A,[],3); B gives the 2D matrix of maximums along the third dimension and I gives the corresponding 3rd dimensi...

대략 10년 전 | 0

답변 있음
How to sort an array in descending order and you also have idea about the position to which it descend ?
You can use the second argument produced by 'sort': [B,p] = sort(A,'descend'); q = 1:length(p); q(p) = q; The v...

대략 10년 전 | 0

답변 있음
Trying to calculate the square root of a positive number based on the “divide and average” scheme.
The line v = (v_pre + t/v_pre)/2.0; is your trouble. It should read: v_pre = (v_pre + t/v_pre)/2.0; However, yo...

대략 10년 전 | 0

| 수락됨

답변 있음
Loop Question with divison
For the precise number 0.357, which equals 357/(2^3*5^3), you can never arrive at an exact whole number by repeatedly multiplyin...

대략 10년 전 | 0

| 수락됨

답변 있음
If any one can remove the error from this code.when i run this code it is showing the following error
As the error message indicates, you are erroneously using a function handle, namely 'u_xt', as though it were an array that coul...

10년 초과 전 | 0

답변 있음
How to plot this matrix?
In http://www.mathworks.com/help/matlab/ref/hold.html Mathworks states that for 'hold all' "This syntax will be removed in a fut...

10년 초과 전 | 0

답변 있음
Why doesn't Procrustes function allow X to have lower number of columns?
Each of the rows in X and Y represent a point in some n-dimensional space, and the number of columns is therefore this dimension...

10년 초과 전 | 0

| 수락됨

답변 있음
Why does 10^61 not equal 1e61 in MATLAB?
Matlab uses two different functions for these computations, the exponentiation function for 10^61 and the decimal-to-binary conv...

10년 초과 전 | 0

| 수락됨

답변 있음
Error "Unbalanced or unexpected parenthesis or bracket"
The brackets are your problem. For example, the line for A should read: A(i) = (t(i+1) - t(i))/h; However, after you hav...

10년 초과 전 | 0

답변 있음
Ha(w) = 1./ ( ( (s./wo)+1).*( (s./wo).^2 + ((2*cos((si1)*s))./wo ) + 1 ).*( (s./wo).^2 + ( (2*cos((si1)*s))./wo ) + 1 ) ); Subscript indices must either be real positive integers or logicals.
I would guess it is caused by w in Ha(w) being neither a real positive integer nor a logical.

10년 초과 전 | 0

더 보기