Respondida
How could I find the integral of a function given this code?
If a is not zero, then “x_t = r_x*(b-a);” is wrong. It should be: x_t = a + r_x*(b-a);

más de 8 años hace | 0

| aceptada

Respondida
Please help me in coding of multidimensional array
A = A([1,4,6],[1,4,6]);

más de 8 años hace | 0

Respondida
How to display two similar functions on a graph?
You could use different 'linespecs' in the plots, say 'y0' on one and 'r*' on the other. If the two sort results are the same, t...

más de 8 años hace | 0

| aceptada

Respondida
Interest and displaying balance until double the investment?
This is equivalent to evaluating y = ceil(log(2)/log(1.1));

más de 8 años hace | 1

Respondida
How can I numerically find a solution of a series of two differential equations.
This is hardly a matlab problem. At an equilibrium you would have the equations: -4*x + 1*y = 0 2*x - 3*y = 0 T...

más de 8 años hace | 0

Respondida
Counting Euler Angle Ranges
Assuming your rotation values, ‘r’, are successively indexed by, say, ‘ix’, then use (r(ix-1)<30 | r(ix-1)>60) & r(ix)>...

más de 8 años hace | 1

| aceptada

Respondida
How to plot y = cos(pi/4)
Choose upper and lower limits of x as a and b. Choose the desired number of plot points as n. x = linspace(a,b,n); y = ...

más de 8 años hace | 0

| aceptada

Respondida
Summation of Infinity Terms
In the summation symbol ‘m’ is supposed to range over only the odd positive integers. You have it ranging over all positive int...

más de 8 años hace | 0

Respondida
Subscripted assignment dimension mismatch
There are quite a few things wrong with this code. 1) In “for i = 1:length(particlePosition)” you will get only three values ...

más de 8 años hace | 1

| aceptada

Respondida
How to create a matrix that returns max values in each column/row in a vector
How do you want these maxima arranged in your vector result? Here is one possibility. Let M be your matrix. A = [max(M,1)...

más de 8 años hace | 0

Respondida
How would I sum a function and use fzero?
Using ‘fzero’ on that particular problem is needlessly inefficient. You can use ‘atan2’ and ‘asin’ instead. cn = cos(t1)+c...

más de 8 años hace | 3

Respondida
recursive function hangs after a few steps
The trouble with your recursion is that for an original call with, say, n = 26 it will recursively call on itself twice with n =...

más de 8 años hace | 2

Respondida
How to subtract elements in a matrix
You don't need a for-loop. C = nchoosek(1:size(A,2),2); B = A(:,C(:,2))-A(:,C(:,1));

más de 8 años hace | 1

| aceptada

Respondida
Randomly pair two sets of integers, without repeating the first set?
M = [reshape(set1(randperm(32)),[],1),set2(randi(8,32,1))];

más de 8 años hace | 0

| aceptada

Respondida
How to find a standard matrix for a transformation?
Assuming the transformation is homogeneous - that is, it leaves the origin fixed - what you have here is six linear equations wi...

más de 8 años hace | 1

| aceptada

Respondida
Question about using ODE45
(Corrected) Using ‘ode45’ is a very bad idea for this problem. Since dy/dx does not depend on y, this is a simple problem in ...

más de 8 años hace | 2

Respondida
Linear system equations - plan intersection?
Each of these equations defines a plane. Their intersection will in general be a single straight line. You can define a straig...

más de 8 años hace | 0

Respondida
Non trivial Solutions for a system of equations
Replace a, b, and c with the symbols x, y, and z, respectively: t1*x + y - t1*tm*z = tm t2*x + y - t2*tm*z = tm t3...

más de 8 años hace | 2

| aceptada

Respondida
Index error when calculating mean of a column
I suspect you have a variable or function somewhere in your code named ‘mean’. If so, you should name it something else so that...

más de 8 años hace | 1

Respondida
How to modify loop
There is no single matlab function that will calculate it, but you can make use of the geometrical theorem that the radius of...

más de 8 años hace | 0

Respondida
How to randomized a n by m matrix ?
You can use my File Exchange routine “randfixedsum” at: <http://www.mathworks.com/matlabcentral/fileexchange/9700-random-vec...

más de 8 años hace | 1

Respondida
Finding the number of numbers above double the standard deviation.
I am guessing that what you really have in mind is the count of those elements which differ from the mean value by more than twi...

más de 8 años hace | 0

| aceptada

Respondida
I am getting error 'In an assignment A(I) = B, the number of elements in B and I must be the same.' How should I resolve the problem?
With the line Ma(chm) = [a*28.8*4.76] the second time through the for-loop, the ‘chm’ in Ma(chm) will have one element ...

más de 8 años hace | 0

Respondida
Put elements into corresponding locations of upper triangular matrix
Let vector ‘inpt’ have size = n*(n+1)/2,1. otpt = zeros(n); otpt(triu(ones(n),0)==1) = inpt;

más de 8 años hace | 8

Respondida
finding intersection of two lines?
If your “yellow star point” is as indicated in your diagram, there is a simple formula for finding it which doesn’t require find...

más de 8 años hace | 1

| aceptada

Respondida
Generate logical vector of specific pattern of numbers
Let n be the number of desired elements in your pattern. t = 1:n; x = (11*t+2+3*mod(t,2))/8;

más de 8 años hace | 0

Respondida
how to solve equation like this
Define z = x^(1/6). Then your equation becomes: z^15 + z^2 - 100 = 0 You can solve this numerically using the ‘roots’ ...

más de 8 años hace | 0

| aceptada

Respondida
Is there have a code to find the radius of curvature of a series of points in 3D
You can make use of the geometrical theorem that the radius of a circumscribing circle of a triangle is equal to the product of ...

más de 8 años hace | 1

Respondida
What is meaning of x(x==c1) = 127 ?
It means that every element in array x that equals c1 is replaced by the value 127.

más de 8 años hace | 0

| aceptada

Respondida
how can i solve equation with summation
If I interpret your code correctly, you are doing things the hard way. Your expression for Pfa is simply the binomial expansion...

más de 8 años hace | 0

Cargar más