Answered
How to generate additional 3D points in a local coordinate system?
You need, (1) A 3x3 matrix A whos columns are the local axes of your point cloud, expressed in global coordinates. (2) A 3x1 v...

5 years ago | 1

| accepted

Answered
I'm trying to maximize the following function given the constraints using linprog, but I can't seem to figure it out. What am I doing wrong?
A = [3 4; 1 -1; 1 4; 3 1]; % b = [24; 3; 4; 3]; % f = -[5 2]; lb=[0,0]; ...

5 years ago | 0

| accepted

Answered
How do I put annotation text pointing towards specific coordinate?
x=[1 2 2.5 3 4 5]; y=[0 5 7 6.5 2 0]; A=3.4;Lagrange(x,y,A); function yint=Lagrange(x,y,xx) A=3.4; n=length(x); s=0; ...

5 years ago | 1

| accepted

Answered
Volume Viewer Image Mirror Image (Wrong Orientation)
Couldn't you read the data into Matlab as a 3D array and permute() it?

5 years ago | 2

| accepted

Answered
How do I create a matrix block of 128x128 for the matrix below whilst wiping away the E value ( E=0) only in blocks 28 and 48.
only in blocks 28 and 48. Are 28 and 48 linear matrix indices, here? If so, then, E = 29000; A = 25; Ix = 39; Iy = 21; T...

5 years ago | 0

| accepted

Answered
How to use spline interpolation to find intersection point of two lines.
If they are straight lines, I'm not sure why you would want to use splines. x = [-10 2]; y1 = -x; y2 = x+6; P=[x,x;y1 y2...

5 years ago | 0

Answered
Rotation of 3 vectors together
It's definitely not possible for an arbitrary combination of angles, but when a solution does exist, this should find it: x =...

5 years ago | 2

Answered
Assign the same variable to all elements of a Matrix
I haven't worked with YALMIP, but can't you do M=sdpvar(n); M(:)=x;

5 years ago | 0

Answered
Calculate Rotation matrix from 3 points
You can use this File Exchange submission, https://www.mathworks.com/matlabcentral/fileexchange/26186-absolute-orientation-horn...

5 years ago | 1

Answered
Does intlinprog find a local minimum or global minimum?
In ideal math, yes, however real world computers can't do ideal math, so you can be significantly off from the global solution d...

5 years ago | 1

| accepted

Answered
I have to draw eiffel tower in matlab. Kindly share your ideas.
Perhaps as follows. A=imread('https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Tour_Eiffel_Wikimedia_Commons.jpg/300px...

5 years ago | 1

| accepted

Answered
Inversion of a singular matrix
I don't know what fitcdiscr does internally, but we can be quite certain Matlab would never invert a matrix explicitly, even if ...

5 years ago | 0

| accepted

Answered
Is there any way I can optimize the multi variate function using vector as an input in Matlab?
You can embed many small optimization problems in a larger problem by summing the objectives, like in the example below. However...

5 years ago | 0

Answered
Parfor iterations and number of cores
The number of loop iterations isn't limited by the number of cores you have. However, if you have 4 cores, the loop iterations c...

5 years ago | 0

| accepted

Answered
How to solve a linear ill conditioned system of equations
I don't think the equations should require regularization. The only vector in the nullspace of A is ones(12,1) , but R is insens...

5 years ago | 0

| accepted

Answered
Transfer values of Matrix to a specific Position in another Matrix
K_l = [1:4; 5:8; 9:12; 13:16]; K_test = zeros(8,8); K_test([1,2,5,6], [1,2,5,6])=K_l

5 years ago | 1

| accepted

Answered
Applying a function using elements of a vector and storing the results as elements in a matrix
v = [1, 2, 3, 4, 5]; u=v.'*v

5 years ago | 0

| accepted

Answered
optimizer to use in MEX
You're not going to get any advantage from including the optimization in the MEX unless possibly the optimizer is also implement...

5 years ago | 0

Answered
How to change the layer order of axes?
You can re-order the Children property of the TiledChardLayout,e.g., tt.Children=flip(tt.Children)

5 years ago | 0

Answered
Question about vectorized fminsearch using flipud
I think it would help to work with a simpler example, and one that actually uses fminsearch directly. As you can see below, the ...

5 years ago | 0

Answered
I have 5 nonlinear algebraic equations with many terms, fsolve command is ineffective in solving these nonlinear equations.
Rather than using loops, you should probably do a grid search using ndgrid just to see if the equations ever get close to zero. ...

5 years ago | 0

Answered
How to remove outliers in a 3D surface
You could try rmoutliers().

5 years ago | 0

Answered
Rotate coordinate system axes
The attached class permAxis3D might be what you want. It acts as a wrapper interface for an ordinary figure axis object, but per...

5 years ago | 0

| accepted

Answered
mldivide versus least squares: X\(eye(m)) versus ( (X'X)\eye(m))*X'
However, since I have to do this repeatedly and X does not change If that's the case you should organize the different Y into t...

5 years ago | 0

| accepted

Answered
How to make a function work with vector inputs?
function interp = lerp(A,B,t) t=t(:).'; interp = B(:)*t + A(:)*(1 - t); end

5 years ago | 0

| accepted

Answered
Input A of class cell and input B of class cell must be cell arrays of character vectors, unless one is a character vector.
It is puzzling that A and B are cell arrays when they could easily just be vectors. Nevertheless, they can be converted with cel...

5 years ago | 0

Answered
How to pass several anonymous functions to the anonymous fitness function in gamultiobj()?
objective1 = @(x) minimize_val1(x,input1); objective2 = @(x) minimize_val2(x,input2); objective3 = @(x) minimize_val3(x,input3...

5 years ago | 0

| accepted

Answered
Replacing a part of a matrix in two commands?
Maybe as follows? E(3:5,3:5)=(1:3:7).' + (0:2)

5 years ago | 0

Answered
Replacing a part of a matrix in two commands?
It's so hard to know what constitutes a "command" in the opinion of your instructor. The following does it in one line, E(3:5,3...

5 years ago | 0

Load more