Answered
Is it possible to display all the data tips in a plot at once instead of right clicking each one?
Hold down the Shift key while you click at multiple plocations.

4 years ago | 0

Answered
How do I calculate norm with a for loop?
pdist2(A,B)

4 years ago | 0

Answered
Immersion of a polar surface in cartesian space
Something like this, perhaps surf(X1,Y1,Z1); hold on %Initial surface [X2,Y2]=pol2cart(theta,rho); T = delaunay(X2,Y2); ...

4 years ago | 1

| accepted

Answered
help with using surface fit function
You haven't specified the fit type. Also, your X, Y, and z elements all need to be (256^2)x1 vectors. [XX,YY]=ndgrid(X1,Y1) ...

4 years ago | 0

| accepted

Answered
Write a program so that with help of 3 for-end loops we form a matrix C that will be equivalent to C= A*B - B*A
A=rand(4); B=rand(4); %synthetic input data M={A,B;B,A}; mask=[1 1;1,-1]; for i=1:4 M{i}=mask(i)*M{i}; end for ...

4 years ago | 0

Answered
How to create a variable where certain subjects are coded as 1?
flag_artifact=strcmp(T.subject,'T_300'); T.subject(flag_artifact)='1';

4 years ago | 0

| accepted

Answered
How to efficiently perform Fminsearch fitting
There's no need for a for loop in Ifunc function Itheory = Ifunc(y,Ro,Imeas, bet_a, k, I_size) % Itheory = Imeas.*exp(-2*be...

4 years ago | 0

| accepted

Answered
MILP code for maximisation
lb=zeros(size(f)); x = intlinprog(-f,1:10,A,b,[],[],lb,lb+1);

4 years ago | 0

Answered
GA Optimization not working because fitness function must be a function handle.
There is no real reason to use optimproblem for a simple 1D bounded problem. Just do, [x fval] = ga(@fuelconsumption,1,[]...

4 years ago | 1

| accepted

Answered
How to find closest values within a matirx
A=[nan(1,3) 7 8 9; nan(1,2) 5 7 8 7; 4 8 6 8 3 4; 4 7 0 1 1 4] nanmap=isnan(A); [~,idx]=bwdist(~nanmap); A(...

4 years ago | 1

| accepted

Answered
fmincon does not fulfil constraints
so I used the debugging now for a while an I noticed one thing. fmincon changes the values of x just very little from step to st...

4 years ago | 0

Answered
How can I optimize layer and neuron numbers and choose the best activation functions for my neural network?
Perhaps with the Experiment Manager? https://www.mathworks.com/help/deeplearning/ref/experimentmanager-app.html?s_tid=srchtitle...

4 years ago | 1

Answered
How to do Fminsearch- Curve fitting
Currently, you are minimizing your prediction function. You need to be minimizing, not the prediction, but a function that compa...

4 years ago | 1

Answered
How do I create a nested for loop to find consecutive numbers in a matrix? See example below.
A = [0 1 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 0 1 1 0 1 1 0 0 ...

4 years ago | 0

Answered
Manipulating cfit data/curve to shift fit line along xaxis
Download these files, https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetitions-i...

4 years ago | 0

Answered
Create a new array everytime with the change of sign in an array
Download these files, https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetitions-i...

4 years ago | 1

| accepted

Answered
Solving Multi integer problem with non linear constraints
Nothing can really be said without seeing a mathematical description of the problem. However, it doesn't seem theoretically like...

4 years ago | 0

Answered
How to crop the initial values and the last values of a column
colx=colx(101:end-100,:)

4 years ago | 1

Answered
Measure distances in binary image along specified directions
Well, getting the horizontal and vertical distances are pretty easy (see below). For the diagonal distances, I would apply imrot...

4 years ago | 1

| accepted

Answered
Apply "whos" to fields of a struct to get their sizes?
Something like this, perhaps? a=rand(100); b=1:4; S.a=a; S.b=b; Sbytes=whosstruct(S); whos a b Sbytes function Sby...

4 years ago | 1

| accepted

Answered
Is there any function available for 3d point clouds to do control point registration?
If the transformation model that you're registering is just a (non-reflective) similarity transform, you can use this, https://...

4 years ago | 0

Answered
How can I find out the indices of the largest 10 values within the matrix?
[stored,indices] = maxk(A(:),10);

4 years ago | 0

Answered
I want to find out points whose coordinates are within the volume formed by a cone shape.
Draw a vector from the cone vertex to the point and compute the angle of this vector to the cone's axis. If the angle is less th...

4 years ago | 0

Answered
Problem 6. Select every other element of a vector
It's wrong because you have assumed that IF statements on a vector distribute in some way across the elements of the vector. The...

4 years ago | 0

Answered
How can I sum arrays internally to get a new array using a loop.
yourVector=rand(1,288*50); days=sum(reshape(yourVector,288,[])); whos yourVector days

4 years ago | 0

| accepted

Answered
Hello everyone.I'm new to the community, please help me to use matlab to calculate the volume of this 3D Shape
The volume can be parametrized by introducing a third variable 0<=w<=1, x=(1-u).*(3+(w*cos(v))).*cos(4.*pi.*u); y=(1-u).*(3+(w...

4 years ago | 2

Answered
2-D interpolation with extrapolation value for out of range data.
Map X,Y to equivalent points that are always in bounds, [u,v,w]=sph2cart(X,Y,1); [X,Y]=cart2sph(u,v,w);

4 years ago | 0

Answered
Hello everyone.I'm new to the community, please help me to use matlab to calculate the volume of this 3D Shape
Just as a hint, it's pretty easy to show that the cross sections of the horn are circle with radius (1-u) and whose center is pa...

4 years ago | 1

Answered
Problems with fminsearch giving startvalues as result
With a simple parameter sweep I get better results than fminsearch. I don't know how you've implemented the sweep, but I don't ...

4 years ago | 0

| accepted

Load more