Answered
How to do 4-D Equivalent of 3-D surface fitting ?
You can lsqcurvefit if you have Optimization Toolbox. If not, then you might be able to use fminsearch, if you have only a smal...

8 dagar ago | 0

Answered
How to use a trained neural network as objective function in fminsearch?
fminsearch.is unlikely to be able to handle 12 unknowns well. You should probably use fminunc if you have the Optimization Toolb...

8 dagar ago | 0

| accepted

Answered
How does the mod function compensate for floating point round off?
I suspect it is just meant to tell you that it doesn't do a naive computation like in modNaive below. m=1000*pi; n=pi; mod(...

8 dagar ago | 1

Answered
Plotting a triangle from 3 3x1 matrices
a = [5; 8; 13]; b = [-5; 7; 21]; c = [12; -32; 0]; V=num2cell([a,b,c,a],2); plot3(V{:},'-o', MarkerFace='r'); xlabel x; ...

8 dagar ago | 0

| accepted

Answered
If I renew my support contract can I download and install in new computer
The support contract is unrelated to the ability to install on additional machines. Most licenses entitle you to activate a Matl...

9 dagar ago | 0

Answered
Why fsurf show anything for my function?
You should normalize the function, so that the default MeshDensity works well. syms eta__2 zeta__2 Hvs2 =((230584300921369395...

9 dagar ago | 0

| accepted

Answered
How to find mean in theta-direction?
[theta,rho]=cart2pol(x,y); G=discretize(rho,___); %fill in the blank with desired binning specs zMean=splitapply(@mean,z(:...

9 dagar ago | 1

| accepted

Answered
Potential Bug? Freezing while making plots iteratively
Does the freeze always happen right before the saveas? If so, it might be worth issuing a drawnow() command right before the sa...

9 dagar ago | 1

Answered
Don´t know how to perform IFFT considering my frequency.
But I don´t understand what is the correlation between parameter "n" and my frequency, how do I know how many points to solve? ...

9 dagar ago | 0

| accepted

Answered
How to re-scale a part of 2D matrix?
range=VD>1901&VD<1919; Pe_OPT(range,:) = rescale(Pe_OPT(range,:), 2.778e+07, 3.1005e+07);

9 dagar ago | 0

| accepted

Answered
how to rotate a 3d matrix ?
A=randi(50,5,4,3) rot90(A) %or imrotate(A,90)

9 dagar ago | 0

Answered
how to rotate a 3d matrix ?
permute(A,[2,1,3]) or pagetranspose(A)

9 dagar ago | 0

| accepted

Answered
Find min and max value of vector without using built-in function
%maxval = A(1); %minval = 1; maxval = -inf; minval = +inf;

9 dagar ago | 0

Answered
Extreme points of a polyhedral set
If the polyhedron is bounded, you can use lcon2vert, downloadable from, https://www.mathworks.com/matlabcentral/fileexchange/30...

9 dagar ago | 1

Answered
Is there a way to get rid of white dots in image?
medfilt2 would be appropriate. A=imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1129070/image.jpg'); ...

9 dagar ago | 0

| accepted

Answered
detecting circle using hough tranform
I find that imfindcircles is often hard to parameter-tune. Here's an alternative solution using this circle-fitting tool, https...

10 dagar ago | 0

Answered
how to generate random number between two numbers ?
rand(1,100);

11 dagar ago | 0

Answered
How to find sx and sy and F intrinsix matrix in camera calibration
You can only find the focal length if you know the pixel sizes at the image plane. There's probably no way you can get it, but I...

13 dagar ago | 0

| accepted

Answered
How to efficiently find and step through similar values in a vector.
Download this, https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetitions-in-vecto...

13 dagar ago | 0

| accepted

Answered
Class handler to call static methods
h=@(varargin) feval([vehHand '.MakeSound'],varargin{:}); h(arg1, arg2,...,argN)

15 dagar ago | 0

Answered
how can generate an adjacent rectangle ?
You haven't said how the rectangle is being represented as a Matlab variable. If it is a polyshape object , you can use translat...

15 dagar ago | 1

| accepted

Answered
Solve implicit equation for isentropic flow
For example Aratio=4, g=1.4, the true result is M=2.94 We can see below that M=2.94 is not a solution, so either you have atypo...

15 dagar ago | 0

Answered
App Builder uses class definitions that are not backwards compatible to 2018b. Is there a way to force it to use older class definitions?
GUIDE has an option to generate code. Does AppDesigner have something similar? I hadn't thought so, but apparently, it does. ...

15 dagar ago | 1

| accepted

Answered
How to return value to zero before index of specific element in matrix?
m=4;n=8; Matrix=rand(m,n), V=[3;7;2;5]; Matrix=Matrix.*((1:n)>=V),

15 dagar ago | 0

| accepted

Answered
Problem fitting with lsqcurvefit
Your model has 3 unknowns w(1), w(2), and w(3). However, you are only providing initial guesses x0 for 2 of these variables.

16 dagar ago | 1

Answered
find the corresponding x and y coordinates
i=100; x=-179:0.02:-175; y=10:0.02:20; [j,k]=ind2sub([numel(x),numel(y)], i); xi=x(j) yi=y(k)

18 dagar ago | 0

Answered
How do I plot this set as 3d region in matlab?
This will plot the hull for x=y=0; Looks pretty convex (as we knew it must be). x=0;y=0; fcn=@(u,v,z)x.^2+y.^2+u.^2+v.^2-z + 0...

19 dagar ago | 1

| accepted

Answered
Get array of elements based on occurrences of another vector
y=[0;1;2;3;4]; x=[1;1;2;2;2]; z=splitapply(@(x){x},y,x); z{:}

19 dagar ago | 1

Answered
nargout unavailable in anonymous functions when run from Live Script
Tech Support has classified it as "a bug in MATLAB Live Editor for 'nargout' function".

19 dagar ago | 1

| accepted

Load more