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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

Beantwortet
for the prime number HW
Same answer as in http://www.mathworks.com/matlabcentral/answers/270893

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 2

| akzeptiert

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

etwa 10 Jahre vor | 1

| akzeptiert

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 1

| akzeptiert

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 2

| akzeptiert

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 1

| akzeptiert

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

| akzeptiert

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

etwa 10 Jahre vor | 0

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

etwa 10 Jahre vor | 0

Mehr laden