Answered
Find Inflection Points from excel file
For your situation with discrete points, I would look for places where the curvature changes sign. With four successive points,...

10 years ago | 0

Answered
How to generate a random numbers with increase in percentage?
Then do next_speed = 1.1*rand_speed

10 years ago | 0

| accepted

Answered
"Row index exceeds table dimensions." error eventougth size of table and index is the same?
If you want a row to be deleted only when it is entirely empty, then you should use this: data(all(idxToDelete,2),:)=[]; ...

10 years ago | 0

Answered
Complex multiplication giving wrong answer
The trouble lies in the line V1=(1/3)*P1*[Va Vb Vc]' You should have used this: V1=(1/3)*P1*[Va Vb Vc].’ As yo...

10 years ago | 0

| accepted

Answered
Is it possible write subroutines with input arguments in MATLAB?
You should be able to use a matlab function for that purpose. The information that you use as input to call on it remains in yo...

10 years ago | 1

Answered
Draw observations from Dagum distribution
According to the Wikipedia site https://en.wikipedia.org/wiki/Dagum_distribution the cumulative distribution function o...

10 years ago | 0

| accepted

Answered
Cannot find explicit solution
I’m afraid you will just have to take solve’s word for it that it cannot find an explicit solution to your equation. I believe ...

10 years ago | 0

Answered
How can i done this problem?
The integral(xdy+ydx) is equivalent to integral(1*d(x*y)). If the integral lower limit is x*y = 0*0 and the upper limit x*y = 1...

10 years ago | 2

| accepted

Answered
Relocating entire blocks of matrix without using loop
M = [M(:,1:n);M(:,n+1:2*n);M(:,2*n+1:3*n)];

10 years ago | 0

| accepted

Answered
hello every body, I want to ask about how to repeat this equation by iteration in image processing in matlab:
For this particular kind of linear expression, there is an alternate formula which obtains the value of x(n) without computing a...

10 years ago | 0

Answered
Counting number of elements in an interval across a range?
This is precisely what Matlab’s ‘histc’ (or ‘histcounts’) function is designed to do. Read about it at the site: http://w...

10 years ago | 1

Answered
draw min squares in black and white
Do the following: m = 16; n = 33; A = false(m,n); A(1,17) = true; for k = 2:m v = 2:n-1; A(k,v) = ...

10 years ago | 1

| accepted

Answered
Accumarray error for logspace binning
If the line M4M2_2n = M4M2_2; M4M2_2n( isnan( M4M2_2n ) ) = []; succeeds in shortening M4M2_2, then the required “one-t...

10 years ago | 0

Answered
How to remove certain rows in permutation according to constraints?
t1 = cumsum(A==5|A==9,2); t2 = -1*(A==7); t3 = all((t1.*t2)>=0,2); B = A(t3,:); % <-- Final answer

10 years ago | 0

Answered
Help projecting a vector onto another!
dot(u,v)/dot(v,v)*v;

10 years ago | 2

Answered
How do I solve a matrix for it's variables?
You cannot determine x, y, and z uniquely from your given value of 'euler'. For this value they all reduce to three simple equa...

10 years ago | 0

Answered
what is the mistake,
If A and B are your two square matrices C = A.*(B.');

10 years ago | 0

Answered
Hi, I'm new
It’s a lot easier to do this one by hand and bypass matlab altogether: x^3+x^2-16*x-16 = (x-4)*(x+4)*(x+1) = 0 which giv...

10 years ago | 0

Answered
How can I generate all permutations of a matrix, in which value "1" cannot be repeated in any column or row? Rest of the elements are identical, and a number between 0 and 1.
I don’t know how you want to arrange all the matrices that are to be generated so I leave that aspect to you. Suppose you wish ...

10 years ago | 0

| accepted

Answered
Replace NaN with nearest numerical value to the left in the same row
Let A be your original matrix. The following is vectorized but I doubt if it is at all superior to, or even the equal of, your ...

10 years ago | 0

Answered
I am not able to run the loop
The error message correctly tells you what is wrong. The variables mi and mj have not been defined in your main program and the...

10 years ago | 0

Answered
selecting specific criteria in one column that is part of a matrix
Or, assuming all data in the first column is finite: A = A(A(:,1)<=70,:);

10 years ago | 0

Answered
Problem with the plot of function besselj.
As can be seen on the left side of your graphs, the scaling in the vertical “Eje y” axis is changing. The bessel curves are not...

10 years ago | 0

| accepted

Answered
How do I solve these systems of equations? Keep getting empty matrices.
If you specify theta12 as a known, as you have done, you have in effect three equations to solve and only two unknowns. I think...

10 years ago | 1

Answered
Creation of matrix?
C = zeros(24,144); C(:,1:6:end) = tril(repmat(A.’,24,1)); C(:,2:6:end) = tril(repmat(B.’,24,1));

10 years ago | 1

Answered
How to spread out an arry of matrix randomly
Let n be the desired length of the result and let a = [2 1 -1] : p = randi(3,n,1); % <-- Corrected v = a(p(randperm...

10 years ago | 0

Answered
plot and calculate integral
I wrote a routine for the File Exchange which computes a cumulative integral using cubic (third degree) approximation which you ...

10 years ago | 0

Answered
how to change for loop
The assignment C(A) = B will work but first you must set up C as a five-element column vector. It does matter what it initially...

10 years ago | 0

Answered
How to find intersection of four points in 3d ?
Assume the earth is a perfect sphere with radius R. Let P1=[x1,y1,z1] be the coordinates of one point, and P2, P3, P4 be simila...

10 years ago | 0

Load more