Respondida
Equal area Delaunay-triangulated sphere
Use is suite functions on FEX

más de 7 años hace | 0

Respondida
Interpolation in the baricenter of a tetrahedron
1/4 sum values of 4 nodes

más de 7 años hace | 0

| aceptada

Respondida
How can I get the screen coordinates from perspective projection?
This demo shows how the MATLAB 3D projective works, I'm not sure how CameraViewAngle is related to the size, so I do cropping by...

más de 7 años hace | 1

Respondida
What precisely is conv2(A,B,'same')?
For vectors A and B C = conv(A,B,'same') is equivalent to Cfull = conv(A,B,'full') C = Cfull(floor(length(B)/2) + (1:length...

más de 7 años hace | 3

| aceptada

Respondida
Does unwrap function works for 2D data as well....?
No unwrap works for 1D only. If it seems to work on 2D you are just lucky, because your phase does not have noise and coherent. ...

más de 7 años hace | 0

Respondida
eigenvalues and eigenvector manual calculation
No cheating, this applies for 2x2 only A= [ 0.064911 3.276493; 3.276493 311.2073]; lambda=eig(A); % you should do it by...

más de 7 años hace | 1

Respondida
How to move points in a curve in the normal direction?
Try to reverse the sign before tol x_n(2, 1) = x_airfoil(i, 1) + +1*tol*(y_airfoil(i+1, 1)-y_airfoil(i, 1))/sqrt(((x_airfoil(i+...

más de 7 años hace | 0

| aceptada

Respondida
replace one matrix with the positon indicated in another matrix
B(:,A)

más de 7 años hace | 0

| aceptada

Respondida
how to get real value after IFFT without using abs() and real()
"But at first, I don't know the first term is special" The first term (after fftshift) is Niquist frequency, it is shared if th...

más de 7 años hace | 1

| aceptada

Respondida
Least square fit (regression analysis)
The y vector must be column r = inv(A1'*A1)*(A1'*y(:));

más de 7 años hace | 0

| aceptada

Respondida
Projection of a point onto a closed convex
Use this FEX Q=[50;5000]; % Projection candidates on x.^2-2*x-y-1 = 0 P=ConicPrj(Q,[1 0; 0 0],[-2;-1],-1); % Find the clos...

más de 7 años hace | 1

| aceptada

Respondida
How can I check a known point cooradinates (x,y) if it belongs to a to Triangle which is known vertices coordinates v1,v2,v3 ??
vx = [v1(1) v2(1) v3(1)] vy = [v1(2) v2(2) v3(2)] inpolygon(x,y,vx,vy)

más de 7 años hace | 1

| aceptada

Respondida
error:An array for multiple LHS assignment cannot contain expressions.
Remove the parenthesis [theta04,theta02,dtheta4,dtheta2,ddtheta4,ddtheta2] = InverseRR...

más de 7 años hace | 0

| aceptada

Respondida
Integrate a function over a triangle area
Here is a method. Assuming you triangle T has 3 vertexes P1, P2, P3, each vertex Pi has corrdinates (xi,yi). Any point P insid...

más de 7 años hace | 1

Respondida
how can i seperate the value exp(1i*2*pi*bbbb);
"i want to find the value of x1 from the d1" x1 = d1/abs(d1) if bbbb is real. You need a major update of complex number the...

más de 7 años hace | 0

Respondida
How to choose values ​​in the second and third column corresponding to the drawn numbers?
Why make so complicated? RANDPERM returns the position, store and use it rather than trying to recover it. AA=[ 1 0 4 2 1 5 ...

más de 7 años hace | 1

Respondida
Surf function with interp: symmetric surface shown assymmetrically
The color interpolation carried out by MATLAB is not symetric by values but also by order. This induces the defect. To trick MA...

más de 7 años hace | 3

| aceptada

Respondida
How to randomize a specific number of 0s and 1s so that 0s always precede at least two 1s?
n = 170+70; % length of the array n0 = 70; % number of 0s should not larger than n/3 assert(3*n0<=n,'density of n0 too large...

más de 7 años hace | 0

Respondida
How do I write a program using MATLAB to find the circumference of a area (white) using the unit as a pixcel (i ever Used to command g = regionprops (label, 'Area');)
Assuming your binary is Img with one connexed component c = contourc(double(Img),[1 1]); c = c(:,1+(1:c(2,1))); d = diff(c(:,...

más de 7 años hace | 1

Respondida
Function‘round’. Numerical calculation question
Welcome to the work of floating point arithmetic >> (6/40000)*10000-1.5 ans = -2.2204e-16 >> So actually the calcu...

más de 7 años hace | 2

Respondida
Adding sparse matrices efficiently?
The fatest way to add sparse matrices is to build the sum from scratch. It takes 4 second for 1000 random matrices of 4000x4000...

más de 7 años hace | 0

Respondida
Scale Matrix Dimensions by Factor
>> repelem([1 2 3],3) ans = 1 1 1 2 2 2 3 3 3 >>

más de 7 años hace | 0

| aceptada

Respondida
Solve a cubic equation using MATLAB code
Please download this FEX, There is a file called CardanRoots.m w = linspace(-3,3,10); a = 2./w; b = (3./w+3); c = (4./(w-9...

más de 7 años hace | 2

Respondida
i want to change [3,2,4](1x3 matrix) to 324(1x1 matrix) any help?
This one produces NaN for overflowed data >> polyval([3 2 4],10) ans = 324 >> str2double(char([3 2 10]+'0')) ans...

más de 7 años hace | 0

Respondida
i want to change [3,2,4](1x3 matrix) to 324(1x1 matrix) any help?
>> str2double(char([3 2 4]+'0')) ans = 324 >>

más de 7 años hace | 1

Respondida
How to find the number of occurrences of a particular sequence inside the cell array?
C = {[1; 2; 3]; [1; 2; 3; 4]; [4; 1; 2; 3]; [1; 2]}; sequence_check = [1; 2; 3]; n = sum(cellfun(@(x) ~isempty(strfind(x.',...

más de 7 años hace | 1

| aceptada

Respondida
accumarray function for equal integer values
B1 = [34.1; 34.2; 35.6; 35.7]; B2 = [600; 800; 200; 100]; Br1 = round(B1); u = unique(Br1); [~,J] = ismember(Br1, u); B2s...

más de 7 años hace | 1

| aceptada

Respondida
How many times does a pair of value occur in a row?
dat = [1,3,2,4,1,1,2,4,1,4,4,4,3; 2,1,4,3,2,2,2,4,1,1,1,2,3] x = permute(dat,[2 3 1]); x = sort([x(1:end-1,:,:),x...

más de 7 años hace | 0

| aceptada

Respondida
replace all values of cells between two positions
Second solution, use this File Exchange MCOLON new_matrix = matrix; new_matrix(mcolon(onsets_row1,offsets_row1)) = NaN;

más de 7 años hace | 0

Respondida
replace all values of cells between two positions
new_matrix = matrix; for k=1:length(onsets_row1) new_matrix(onsets_row1(k):offsets_row1(k)) = NaN; end

más de 7 años hace | 1

Cargar más