Answered
Adding skewness to normal distribution in matlab code
If you have the Statistics Toolbox, I suggest you call on the 'pearsrnd' function. You can set the desired skewness value. See...

6 years ago | 1

Answered
Help computing definite integral
It is quite possible that Matlab is unable to solve that integral symbolically. I don't think I know its solution. If not, you...

6 years ago | 0

| accepted

Answered
complicated system of 3 equations,3 unknowns
You have included 'zerolift' in the alpha equations, but in the 'eqn' equations you have also set the expressions to 'zerolift' ...

6 years ago | 0

Answered
Find points within a certain distance of a point
You can do this: n = size(A,1); [I,J] = meshgrid(1:n); I = I(:); J = J(:); D = reshape(sqrt((A(I,1)-A(J,1)).^2+(A(...

6 years ago | 1

Answered
How do I use numeric solvers to solve for t?
You don't need matlab to solve that equation for t. exp(-0.0287*t)=(1/2) -0.0287*t = log(1/2) = -log(2) t = log(2)/0....

6 years ago | 0

Answered
How do you create a random point generation with the values of 1 or 2?
As to your question of how to find the location of the incenter of a triangle, given its three vertices, here is how. Let (x1,y...

6 years ago | 0

Answered
Plot always appears as a straight line
Are you sure the second "4.14*10.^-21" doesn't belong in the denominator: y = ((m*v)/(4.14*10.^-21)).*exp((-m*v.^2)/(2*4.14...

6 years ago | 0

| accepted

Answered
plot curve from known coordinates and instantaneous slopes
Hint: Suppose your interpolated curve is the following general cubic polynomial with four unknown coefficients: y = a*x^3+b...

6 years ago | 0

Answered
Plotting a Sum of Series
You have forgotten to divide by k in calculating 'u' within your for-loop. You should have: S1=symsum((num/k*t1*t2),k,1,in...

6 years ago | 0

Answered
distance between array entries
Let 'a' be your array (row vector.) n = size(a,2); [t,p] = sort(a); q = 1:n; q(p) = q; t = diff(t); t = [inf,t;...

6 years ago | 0

Answered
Index exceed matrix dimensions
You will get that error message if either 'd' is not at least of size loc-by-loc, or 'x' is not at least of size loc-by-loc-by-p...

6 years ago | 0

Answered
How do I fix an infinite loop?
You are using the 'even' function on temperatures instead of index values. You should probably have something like: h = (T...

6 years ago | 0

Answered
working out acceleration from 2 matrices- HELP
Assuming your 'time' and 'velocity' vectors are corresponding row vectors (have only one row,) you can use the following code to...

6 years ago | 1

Answered
how can i concatenate or merge two variables in 4-D with different sizes
You should use the 'cat' function. It will allow you to concatenate along the fourth dimension.

6 years ago | 0

Answered
How to perform a Monte Carlo simulation?
Assuming you are not required to use a Monte Carlo approach, I would think that the person assigning this problem would expect y...

6 years ago | 0

Answered
Interpolate value between arc
I contend the right way to do that task is to calculate the center of the circular arc you have defined, and then generate the p...

6 years ago | 0

Answered
Finding the product within an interval
If v is your vector of random numbers, do this: p = prod(v(v>=2.3 & v<=2.6)); % The desired product

6 years ago | 1

| accepted

Answered
How can I find a intersection of four ponits?
If A = [x1;y1] and B = [x2;y2] are coordinates of two points as column vectors on one of the lines with C = [x3;y3] and D = [x4;...

6 years ago | 0

Answered
My if statement with multiple conditions gives wrong values
Could it be because you have misspelled 'triangles' as 'traingles' at that point?

6 years ago | 1

Answered
how to write equation in matlab ?
I am guessing that brackets in this case means the same as 'floor', so your code would then be something like this: m = 8; ...

6 years ago | 0

| accepted

Answered
Extractiong sLoreta Data from EEG: transpose on ND array is not defined, use permute instead
In that case what you probably need is 'reshape'. g.data = reshape(EEG.data(61,[]);

6 years ago | 0

| accepted

Answered
Show that sum of two uniformly distributed random variables in not uniformly distributed.
Get a histogram for x = rand(1,n)+rand(1,n) with n a very large number.

6 years ago | 1

Answered
How can I count how many entries are in a matrix?
Use 'numel'.

6 years ago | 0

Answered
How can I write a program that prompts a positive integer and converts it from decimal to hexidecimal?
If you are allowed to use 'dec2hex', your task would be very simple. Otherwise, here's a hint. Suppose your number is 1579. ...

6 years ago | 0

Answered
Plot an Arc on a 2D Grid by given radius and end points
(Correction made) Point vectors A and B must be column vectors A = randn(2,1); % Point A to be on circle circumference ...

6 years ago | 1

Answered
simpsons rule for integration with multivariable
There is some confusion here as to what your variable of integration is to be. In the way you define ‘h’ it would appear to be ...

6 years ago | 0

Answered
hi im getting error like out of memory, likely cause in infinite recursion within the program can anyone help me out plz.. Thank you in advance
Yes, your guess is correct. There is no way a call on ‘VesselExtract’ can avoid doing an infinitely deep recursion as your code...

6 years ago | 0

Answered
How can I solve this system of equations?
Solve kT/3*pi*eta*L*(ln(L/d)+0.312+0.565/(L/d)+0.100/(L/d)^2) for L.

6 years ago | 0

Answered
Indexing exceeds matrix dimensions - error on 2 lines of code
I see one error. In the two lines where an error occurs you are referencing dC(j) where j = 2 on the first trip through the sur...

6 years ago | 0

Load more