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? ...

7 days 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);

7 days ago | 0

| accepted

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

7 days ago | 0

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

7 days 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;

7 days 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...

7 days 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'); ...

7 days 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...

8 days ago | 0

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

9 days 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...

11 days 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...

11 days ago | 0

| accepted

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

13 days 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...

13 days 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...

13 days 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. ...

13 days 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),

13 days 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.

14 days 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)

16 days 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...

17 days 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{:}

17 days 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".

17 days ago | 1

| accepted

Question


nargout unavailable in anonymous functions when run from Live Script
The following code works fine at the command line and in mfile scripts. >>f=@()nargout >> f() ans = 0 >> a=f()...

17 days ago | 1 answer | 2

1

answer

Answered
Calculate the largest, smallest diameter and the centroid of a polyshape (irregula rpolygon) from a set of points
For the centroid, polyshape has a method centroid. If the min and max feret diameters are what you want, then one approach wou...

18 days ago | 0

| accepted

Answered
How to evenly distribute number of points in a non linear line made itself by number of points with different distances
See interparc: https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc

18 days ago | 1

Answered
Mulitpling a scalar to specfic numbers in a vector
One way: [1 3 5 10 15 17 20 25 30].*repelem([2,5,10],3)

18 days ago | 1

| accepted

Answered
Newton iteration doesn't run smoothly
Possibly, you meant to have, if (abs(x-x0)) <= eps

19 days ago | 0

Answered
Nonlinear constraints not respected in optimization
Nonlinear constraints are only satisfied at convergence, and then only within the tolerance settings that you've specified. Yo...

19 days ago | 0

Answered
3d Matrix - Extract Subarray and Multiply by Conjugate Transpose without Forloops
[m,n,p]=size(A); Ar=reshape(A,[],p).'; UU = reshape(Ar,p,1,[]).*conj(reshape(Ar,1,p,[])); UU=reshape(UU,p,p,m,n); %obta...

19 days ago | 1

| accepted

Answered
What is the best and quick way to find the intersections points set of two 3d surfaces?
You can to download this FEX submission, https://www.mathworks.com/matlabcentral/fileexchange/74010-getcontourlinecoordinates?s...

19 days ago | 0

| accepted

Load more