Réponse apportée
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...

environ 8 ans il y a | 1

Réponse apportée
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...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
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' ...

environ 8 ans il y a | 0

Réponse apportée
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(...

environ 8 ans il y a | 1

Réponse apportée
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....

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 0

Réponse apportée
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;...

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 0

Réponse apportée
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...

environ 8 ans il y a | 1

Réponse apportée
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.

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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;...

plus de 8 ans il y a | 0

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

plus de 8 ans il y a | 1

Réponse apportée
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; ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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,[]);

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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.

plus de 8 ans il y a | 1

Réponse apportée
How can I count how many entries are in a matrix?
Use 'numel'.

plus de 8 ans il y a | 0

Réponse apportée
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. ...

plus de 8 ans il y a | 0

Réponse apportée
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 ...

plus de 8 ans il y a | 1

Réponse apportée
I need help with a question: I have a matrix of 100 rows and 4 columns and im suppose to take the average of each column without using the mean function. The output is suppose to be a 1 row by 4 column matrix but i just get a single answer.
If y is your matrix, and you must use a for-loop, do this: n = size(y,2); v = zeros(1,n); for k = 1:n v(k) = sum...

plus de 8 ans il y a | 0

Réponse apportée
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 ...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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.

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Charger plus