Beantwortet
how to find the equation that best fit this curve
The right side of this curve looks as though it is asymptotically approaching a descending straight line. The left side doesn't...

fast 12 Jahre vor | 2

Beantwortet
how to draw piecewise hermite curve.
Here's how to draw one "piece". Let (x1,y1) and (x2,y2) be the coordinates of the two end points and m1 and m2 the respective d...

fast 12 Jahre vor | 2

Beantwortet
Translating Trig Expressions into Code
Your formula is only a valid approximation if the two delta's are small and are measured in degrees. Also theta must be the lat...

fast 12 Jahre vor | 0

Beantwortet
Clever solution sought: Summing values from an array into a vector component given in a second array
You might try using accumarray: A = accumarray(indArray(:),valArray(:),[M,1]);

fast 12 Jahre vor | 1

Beantwortet
binocdf function apparently not functioning with very small numbers (near 1e-15)
Your problem is one of accuracy at the upper end. You have written: usk = 1 - binocdf(k,n,(1/factorial(s))); so that a s...

fast 12 Jahre vor | 2

| akzeptiert

Beantwortet
Randomise the upper triangle of a matrix
If you are going to do this randomization 10000 times, you would want it to be as efficient as possible. Here is a possible way...

fast 12 Jahre vor | 4

| akzeptiert

Beantwortet
Quad error, simple function,
Your function definition is lacking operators in at least four places, one after "cpn(2)", one after "cpn(4)", and one before ea...

fast 12 Jahre vor | 1

Beantwortet
Probablity distribution calculation for a vector
From the documentation for normpdf at http://www.mathworks.com/help/stats/normpdf.html *"Y = normpdf(X,mu,sigma) computes...

fast 12 Jahre vor | 1

Beantwortet
Does this formula wrote in correct way in the matlab
At the right end of your formula, ".√(E²-m²)", are you sure the dot signifies multiplication? If it were to mean that, as I hav...

fast 12 Jahre vor | 2

Beantwortet
Please help me to modify the following program
[~,p] = sort(rand(n-1,d)); A = accumarray([reshape(p+(p>=T),[],1),repmat([1:S-1,S+1:n]',d,1)],1,[n,n]); A(1:n+1:n^2) = 0;

fast 12 Jahre vor | 3

| akzeptiert

Beantwortet
can anyone explain, how following program is working?(5th step)
If you prefer vectorized solutions, I could just as well have put the solution in this form: [~,p] = sort(rand(4,7)); A = ...

fast 12 Jahre vor | 0

Beantwortet
can anyone explain, how following program is working?(5th step)
The 'randperm' function is generating random permutations of the sequence, 1,2,3,4. For example suppose it generate p = 4,3,1,2...

fast 12 Jahre vor | 3

| akzeptiert

Beantwortet
how can i solve the matlab warning message
The range of integration you are using, 0 to 0.693, includes values which lie inside the interval, -m < x < +m, and that will gi...

fast 12 Jahre vor | 2

| akzeptiert

Beantwortet
How i can create random array with fixed sum for each row and column?
I assume by _"rounded off"_ you mean the elements are all to be integers. Do this: A = zeros(4); for k = 1:7 p = rand...

fast 12 Jahre vor | 3

| akzeptiert

Beantwortet
Reflect a triangle given a mirror line
I suggest you look at John D'Errico's advice on this kind or problem at: https://www.mathworks.com/matlabcentral/newsreader/...

fast 12 Jahre vor | 0

Beantwortet
Taylor series sum and factorial
Here is a method that doesn't require the 'factorial' function. See if you can figure out why this is equivalent to the formula...

fast 12 Jahre vor | 1

Beantwortet
Symbolic equation is too long to be displayed.
Your 25000-plus-character result demonstrates the perils of attempting to always obtain a single symbolic expression as the solu...

fast 12 Jahre vor | 1

| akzeptiert

Beantwortet
How to solve an equation with term beyond realmax?
The following is a somewhat improved version of my previous answer. It guarantees that you will not get a NaN for the product o...

fast 12 Jahre vor | 2

| akzeptiert

Beantwortet
How to solve an equation with term beyond realmax?
Your trouble would occur when both B and C are too large. In your function which evaluates the product exp(B)*erfc(C) you could...

fast 12 Jahre vor | 5

Beantwortet
How can I generate a predefined matrix of desired dimensions from the following code?
*"But how to set another dimension?"* Your question isn't clear to me. The number of columns in A after the operation by 'orth...

fast 12 Jahre vor | 1

Beantwortet
Find row with NaN in it.
The code t = any(isnan(X),2); will return you a column vector of logicals in which each element is true if the correspo...

fast 12 Jahre vor | 3

Beantwortet
Tube-Plot with x-y-Coordinates and radius
Let P1 and P2 be 1 x 3 row vectors of the x, y, z coordinates of two points along your line and let r be the desired radius. ...

fast 12 Jahre vor | 2

Beantwortet
solving a non-linear problem
By appropriate algebraic manipulations you can reduce your (corrected) seven equations to finding the solution of a single equat...

fast 12 Jahre vor | 3

Beantwortet
how can i write a matlab code for the summation below? please help
For x,y points near the edges of the plate, to preserve accuracy, it is necessary to sum the series in odd values of n up to a v...

fast 12 Jahre vor | 2

Beantwortet
solving a non-linear problem
In spite of your claim of seven equations you have given only six of them, which are not enough to uniquely determine the seven ...

fast 12 Jahre vor | 3

Beantwortet
Empty system, 1 equation 1 unknow with solve
The function 'solve' is intended to find symbolic solutions to equations. There is no guarantee that it will succeed. If it fa...

fast 12 Jahre vor | 2

Beantwortet
cross correlation matrix dimension
The nested for-loops are not doing what you appear to have in mind. You are doing a summation on scalars there. Also some of t...

fast 12 Jahre vor | 1

Beantwortet
Minimization of a integration function
In general for minimization problems with constraints you should use 'fmincon'.

fast 12 Jahre vor | 2

Beantwortet
A VERY slow Matlab code!
In the inner two for-loops you have ordinary matrix multiplication. You should make use of it. function du = odefungPC(u,Di...

fast 12 Jahre vor | 4

| akzeptiert

Beantwortet
Minimization of a integration function
There can be no finite minimum to this objective function. The more negative you make xa, the more the integral decreases. Min...

fast 12 Jahre vor | 1

Mehr laden