Réponse apportée
calculating trace of matrix without calculating the matrix itself
Let tmp be an n by n matrix. B = tmp(vecx+n*(vecy-1)).'; (Note: The ‘trace’ is the sum of the diagonal elements of A, no...

environ 9 ans il y a | 0

Réponse apportée
Subscripted assignment dimension mismatch
’temperature' is an array, not a scalar, and when the scalar 'matrice_cartesian(i,10)' is subtracted from it, it remains an arra...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Sample from multivariate exponential distribution
You can make use of the ‘gammaincinv’ function for this problem: X = randn(m,n); X = X.*repmat(gammaincinv(rand(m,1),n...

environ 9 ans il y a | 0

Réponse apportée
hey guys.,x1=[6.630]; y1=[12.294]; z1=[-1.457]; x2=[7.613]; y2=[12.686]; z2=[-0.404]; x3=[8.324]; y3=[11.427]; z3=[0.102]; x4=[9.372]; y4=[11.018]; z4=[-0.564]; these are coordinates to calculate phi and psi angles, please tell me how i should do.?
(Corrected) I am assuming that the four sets of coordinates you describe correspond to four points P1 = [x1;y1;z1], P2 = [x2;y2;...

environ 9 ans il y a | 4

| A accepté

Réponse apportée
MVNRND in PC vs. MAC
It is likely that very small differences in the computations that produced your ‘sigma’ matrix are the cause of the differences ...

environ 9 ans il y a | 0

Réponse apportée
How can I write such an equation on Matlab?
Recursion is not a good idea on an iteration of this sort where at each step two different earlier levels are consulted. At the...

environ 9 ans il y a | 0

Réponse apportée
Draw the curve in the x–y plane for which ||(x; y)||inf = 2
plot([-2,2,2,-2,-2],[-2,-2,2,2,-2],’y-‘)

environ 9 ans il y a | 0

Réponse apportée
How to store the results from an iteration process?
You have one too many for-loops clear all A = (1:10)'; x = [5,11]; for i = 1:2 C(:,i) = A * x(i); end ...

environ 9 ans il y a | 0

Réponse apportée
how to define an ellipse using a tangent line and point ?
Arbitrary ellipses in a given two-dimensional plane enjoy five degrees of freedom - that is to say, in a sense they occupy a fiv...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Warning: Explicit solution could not be found. In solve at 81 ans = [ empty sym ]
By a certain trick my ancient version of ‘solve’ can find the solution to your problem which involves the ‘lambertw’ function. ...

environ 9 ans il y a | 0

Réponse apportée
Find length of intersection between 2 points and a sphere
Since this problem is in three dimensions, you can also make use of the cross product function to compute L as follows. Again, ...

environ 9 ans il y a | 1

Réponse apportée
how can i calculate a equation including exceeding value of realmax
It is essential that you include the exp(-lambda), which is part of the Poisson distribution, in your calculations. p(x,lam...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Find length of intersection between 2 points and a sphere
Let P1 = [x1,y1,z1], P2 = [x2,y2,z2], and P0 the sphere center. v = P1-P0-dot(P1-P0,P2-P1)/dot(P2-P1,P2-P1)*(P2-P1); L =...

environ 9 ans il y a | 2

Réponse apportée
How to remove zero sum row from matrix
A = A(:,(A(2,:)+A(3,:)~=0));

environ 9 ans il y a | 1

Réponse apportée
how to convert u(r,z) (axisymmetric) data to u(x,y,z)??
Probably I don't understand your question, but it would seem that the following is the obvious answer, where uppercase 'U' is th...

environ 9 ans il y a | 0

Réponse apportée
Vectorizing the creation of an (m x n) matrix where each row represents a number
Assuming y is a column vector yk = zeros(m,n); yk((1:m)’+m*(y-1)) = 1;

environ 9 ans il y a | 0

Réponse apportée
How to solve DE by matlab
I can help you a little in finding the analytic solution. Temporarily consider that y is the independent variable and t is the ...

environ 9 ans il y a | 0

Réponse apportée
Plot a Surface on a circle and annulus
For the circle (disk) do this: [T,R] = meshgrid(linspace(0,2*pi,64),linspace(0,2,16)); X = R.*cos(T); Y = R.*sin(T); ...

environ 9 ans il y a | 1

Réponse apportée
how to add combinatorics function in matlab with n different objects divided into r groups and each group get at least 1 object
C = zeros(r^n,n); t = 0; for k = 0:(r^n)-1 s = dec2base(k,r,n); if length(unique(s))==r t = t+1; ...

environ 9 ans il y a | 2

| A accepté

Réponse apportée
How do I select values bigger than a certain value & at least 4?
Let A be your 2500 by 1 row vector. f = find(diff([false;A>150;false])); f1 = f(1:2:end-1); ix = f1(find(f(2:2:end)-f...

environ 9 ans il y a | 0

Réponse apportée
How can I solve this problem?
In “ _observe a relationship recurrence between two successive terms, Ti+1 and T1_ ” I believe you are being asked how the n+1-s...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Solving an Integro-differential equation numerically
I hate to see numerical approximation methods used when there exists a very simple and precise method done by hand. First we de...

environ 9 ans il y a | 1

Réponse apportée
how to do sum up elements one by one (sequence addition)
cumsum([1 2 3 4]) equals [1 3 6 10]

environ 9 ans il y a | 0

Réponse apportée
How many combination will appear
I hope you have a lot of memory available to matlab! B will be of size 85900584 by 7. That is, there will be 49!/7!/42! combin...

environ 9 ans il y a | 1

Réponse apportée
How to put data in vector into matrix
The following is an example of inserting a row vector, V, into an m by n matrix, M, in a “spiral transposition”. The spiral in ...

environ 9 ans il y a | 0

Réponse apportée
I would like to know how I can have the line of a matrix.
By “line” I assume you mean “row”. If you know the row in A that has its maximum, that is the same row as the one in P that wou...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
How may I use the find function to search a range or rows and a specific column please?
The 'B' values are the column indices of the matrix X(1:3,4), and relative to this matrix those column numbers are all ones.

environ 9 ans il y a | 0

Réponse apportée
How to calculate the area between the curves y=1/x and x-axis from 3 to inf
Such an area would be infinite-valued. You have to find the integral of 1/x with respect to x from 3 to infinity, and that give...

environ 9 ans il y a | 0

Réponse apportée
Create and plot random points with connected lines
Assume that A is symmetric with zeros on the diagonal (bidirectional connections) and that there are n points. x = rand(n,1...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
Non-linear Implicit function plot
You could plot it using a third variable, t: n = 200; t = linspace(-2,2,n); % <-- Choose appropriate range for t for ...

environ 9 ans il y a | 0

Charger plus