Answered
How to perform 2 dimensional circular convolution
Using FFTs out = ifft2(fft2(A).*fft2(B));

5 years ago | 0

Answered
How to perform 2 dimensional circular convolution
function z=cyconv(x,y) %Non-Fourier domain cyclic convolution. % % z=cyconv(x,y) % %Note: y can be shorter in any of its d...

5 years ago | 0

| accepted

Answered
How to find IDTFT of an array in matlab?
Does matlab has any function for IDTFT It doesn't because your frequency domain data is not really continuous, you're really l...

5 years ago | 0

Question


vecnorm seems slower than it should be
In the speed comparison below, I would expect vecnorm() to be faster than the first version, because the first version creates a...

5 years ago | 1 answer | 2

1

answer

Answered
can you explain to me the error and fix it ? thanks
f= @(x) 1 + 5.25*x - sec(sqrt(0.68*x)); fplot(f,[0 5])

5 years ago | 0

| accepted

Answered
how can i get a column by it's variable name
Masse_ =Masse.(A(2))

5 years ago | 0

| accepted

Answered
cutting a smaller potion of an image
If you download https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equal-sized-sub-arrays ...

5 years ago | 0

Answered
How to calculate absolute mean across numerical array
mean_array = vecnorm(P_acc_y, 1, 2)/24;

5 years ago | 1

Answered
How to calculate absolute mean across numerical array
mean_array = mean( abs(P_acc_y), 2);

5 years ago | 0

| accepted

Answered
Help with graph plotting
Your a and b contain data for 2 lines.

5 years ago | 1

| accepted

Answered
How to write syntax for ga(GA) when we put constraints on the objective function?
In your nonlcon function function [c,ceq]=nonlcon(x) ceq=[]; c=f(x)-6; end

5 years ago | 0

Answered
Does regionprops function work in Matlab App designer
The reason is that your bw is all zeros. Nothing to do with app designer.

5 years ago | 0

Answered
How can i fix this error?
You have a loop running from 2 to 101 for i=2:101 Vr1=Vr1+pi*(1/5)*sqrt(25+(n(1,i)-dz/2)+0.5)^2*dz; end but n has onl...

5 years ago | 0

Answered
Calculate Euclidean Distance between one point and many others
xyz=rand(3,10); %points Dist=vecnorm(xyz,2,1)

5 years ago | 0

| accepted

Answered
"Effectively" create subclass of cell array to eliminate overhead when constructing large object arrays?
If I were you, I would not use arrays of objects. I would hold all of your quaternion data as an MxNx4 member of a scalar object...

5 years ago | 1

| accepted

Answered
How to extract the coordinates of points/vertices in a curve?
f = 10; %define modulation frequency A = .2; % modulation amplitude t = linspace(0,2*pi,120)'; vertices=[cos(t),sin(t),A*...

5 years ago | 1

| accepted

Answered
Generate coordinates for plotting a hexagonal mesh with the nsidedpoly function
C=arrayfun(@edgesamp,1:6,'uni',0); C=vertcat(C{:}); x=C(:,1); y=C(:,2); n=numel(x); p0=nsidedpoly(6,'Radius',1); p=array...

5 years ago | 0

| accepted

Answered
is there any way for me to apply code to a figure?
You can get the x and y data that make up the plot as follows. h=findobj(gca,'Type','line') x=h.XData; y=h.YData; I would ...

5 years ago | 0

Answered
Build a matrix for each loop output
M=zeros(3,4); for j=1:3 As_prov=As.Asst>Asneg(j); i=find(As_prov,1,'first') M(j,1)=As.n1(i);...

5 years ago | 1

| accepted

Answered
How do you find the inverse of a matrix without the inv() command?
There is this File Exchange contribution: https://www.mathworks.com/matlabcentral/fileexchange/12692-adjugate-adjoint-of-a-squa...

5 years ago | 1

| accepted

Answered
Why do I get the error saying I did not assign values to a call? I did assign my values after getting them from a function though? Anyone able to help me out and explain?
The error message is complaining that you did not assign a value to P within atmos(). P is named as an output of atmos, [T, P,...

5 years ago | 0

Question


Loop-free histogramming of each column of an input matrix
Before there was histcounts(), we would use histc(), which is no longer recommended by TMW. But histc() could calculate the colu...

5 years ago | 1 answer | 0

1

answer

Answered
Digits that repeat in an n by m matrix
A = [ 9 5 2 1 5 3 3 2 2 5 1 8 3 1 7 4 3 2 2 6 ...

5 years ago | 1

| accepted

Answered
Digits that repeat in an n by m matrix
A = [ 9 5 2 1 5 3 3 2 2 5 1 8 3 1 7 4 3 2 2 6 ...

5 years ago | 0

Answered
Count 3D points in each block of a 3D grid
You could do like in the following example, which assumes 1x1x1 cells in a 500x500x500 grid. xyz=rand(100,3)*499+1; %random 3D ...

5 years ago | 0

Answered
Solve indefinite integral with unknown lower limit
Looks like there are 2 solutions. format long g T0=1650; rhs=1e-3*T0^2 + 11.66*T0 + 0.67e5/T0; p=[1e-3,11.66, -rhs, 0.6...

5 years ago | 0

Answered
How to use "@" functionhandle for multiple inputs? (to use with fmincon)
objective = @(p) sum( ( a - get_amps(a, p) ).^2); par0=[100,5000]; p_opt=fmincon(objective,par0);

5 years ago | 0

| accepted

Answered
"Too many input arguments" when calling a constructor with named arguments
Note the attached utility copyprops(). function obj = fet(varargin) constants = semiConstants; ...

5 years ago | 0

Answered
Generate all possible combinations of input vector Then store the input and outputs in each iteration in .mat file
Well, here are all the combinations. You can loop through the rows of Pd and save them after whatever processing you wish. You'v...

5 years ago | 0

| accepted

Answered
Stacking diagonal matrices generated from rows of other matrix
C=magic(4) c=C(:,2:4); [m,n]=size(c); p=m*n; D=zeros(p,n); D( (1:n:p)'+ (0:n-1)*(p+1) )=c(:)

5 years ago | 1

Load more