Answered
Generating all unique binary vectors of length N given certain criteria
N=5; A=triu(ones(N)); B=~eye(N); B=B(2:end-1,:); c=nchoosek(2:N-1,2); C=(1:N); C=C<c(:,1)|C>c(:,2); result=...

9 días ago | 0

| accepted

Answered
How to join or merge two Image Data Stores?
Perhaps by wrapping them in a TransformedDataStore (R2019a and higher), imdsnew = transform(imds1,imds2, @(x) x)

9 días ago | 0

Answered
Can i continue to run my matlab programs even when the computer screen is locked using Win+L
Yes, it will continue to run.

9 días ago | 0

| accepted

Answered
how can I have a perfect rect function as the result of applying fft on sinc function?
I want exactly a rectangle like what we have in theory. The FFT of a sinc function is not a perfect rect, even in theory. The ...

9 días ago | 1

Answered
Plotting from function per for-loop iteration
If you want new figure windows for each plot, don't specify a number for them: figure scatter(x,y) figure scatter(x+y,y)

10 días ago | 1

| accepted

Answered
How to find intersection points of multiple line segments in 3D?
If you generate them randomly, they will not intersect. However, generatig and plotting them is no problem, numlines=5; for ...

10 días ago | 0

Answered
matlab function on a grid along third dimension
No, you can't. However a 3x3x3 array is too small for a loop to suffer any serious penalties.

11 días ago | 0

Answered
How to eliminate the elements in an array from another array when there are repeated elements in both arrays?
A = [ 1,2,2,2,3,4]; B = [1,2,2,3]; Au=[unique(A),inf]; reps=max( histcounts(A,Au)-histcounts(B,Au) ,0); C=repelem(Au...

11 días ago | 0

Answered
Restricting solutions using lsqnonlin with complex unknowns
l1,L2,L3 are complex numbers, where the real and imaginary part are two sepparate unknowns, If so, then you have 12 unknowns, ...

11 días ago | 0

| accepted

Answered
Incorrect lsqcurvefit fitting, stays in initial guess
xdata =[2.00E-05 2.45E-05 3.00E-05 3.70E-05 4.55E-05 5.55E-05 6.75E-05 8.25E-05 1.01E-04 ... 1.24E-04 1.51E-04 1.85E-04 2.2...

11 días ago | 0

| accepted

Answered
how to find a normal vector?
In my case, P1 point wil be the V0 and P1 for this function. You need 3 distinct, non-colinear points in a the plane to calcula...

12 días ago | 0

| accepted

Answered
How to have elementwise multiplication expand in two dimensions?
C=A.*reshape(B,[16,16,3,1,7]); C=reshape(C,[16,16,3,700]);

12 días ago | 1

| accepted

Answered
Can I disable intermediate calculations for fmincon
Since you are specifying the objective gradient, finite difference calculations will not be executed for that particular piece o...

12 días ago | 0

| accepted

Answered
How to vertically concatenate certain fields of a structure on each pass of a loop?
clear results for k=numel(files):-1:1 ..... data=pulldata(filename); results(k)=analyzedata(data); end ...

13 días ago | 1

Answered
string matrix navigation with character string
DataSour = ["Do" "Ri" "Mi"; "AA" "VV" "Fa"; "SS" "BB" "Do"; "Do" "yy" "zz"]; ToAssign = "Do"; [ColPos,RowPos]=find(DataSour'...

20 días ago | 0

Answered
Eig takes too long
Does anyone have any suggestions or advice that can help speed up this calculation if that is even possible? I don't think the...

20 días ago | 0

Answered
parabolic fit and extend upwards in 4 points
Use polyfit.

20 días ago | 0

Answered
How to resolve : increase max function value in fitting using fminsearch?
If you have the Curve Fitting Toolbox, [x,y]=readvars('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1034515/d...

20 días ago | 0

Answered
How to resolve : increase max function value in fitting using fminsearch?
You could do as the message says and increas MaxFunEvals, but for your model, it would be better to download fminspleas, https:...

20 días ago | 0

| accepted

Answered
Calculation of the surface area of a generic solid
One way might be to read the stl file into a triangulation object using stlread. With the triangulation object, you can use free...

20 días ago | 0

Answered
Removing all elements from a struct field
[aap.acq_details.sessions.name]=deal([])

22 días ago | 0

Answered
Concatenate into a matrix is not saving and is overriding every iteration?
Ns=numel(subjs); Nt=numel(time); percent_change=cell(Ns,1); for s = 1:Ns subj = subjs{s}; for i = Nt:-1:1 ...

22 días ago | 1

| accepted

Answered
How to create transformation matrix
You wouldn't use a transformation matrix to execute a deformation like that. You would just use griddedInterpolant or interp3 to...

23 días ago | 0

Answered
Revolving a 2D plot around its vertical axis to generate 3D surface
https://www.mathworks.com/matlabcentral/answers/1716995-revolving-a-curve-about-the-y-axis-to-generate-a-3d-surface#answer_96206...

23 días ago | 0

| accepted

Answered
How to pass from a set of points to lines interpolating them?
Image=load('codice_opcode.mat').out; B=bwboundaries(Image); B(1)=[]; imagesc(Image); colormap(gray); axis image; hold on...

24 días ago | 0

| accepted

Answered
How to group logical numbers in a vector?
Use this: https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetitions-in-vectors ...

24 días ago | 0

| accepted

Answered
Cycle for to save a matrix
[nr,mr]=size(Range_compression); [time_compression,range_compressed]=deal(nan(nr,mr)); for i=1:mr [time_compression(...

26 días ago | 0

| accepted

Answered
Find pattern in vector while ignoring/skipping certain indices
vec=[0 4 1 0 6 5 0 8 7, 3 3 3 , 0 4 2 0 6 4 0 8 6]; %patterns start at i=1 and i=13 pat = [0 4 nan 0 6 nan 0 8 nan]; ...

26 días ago | 0

Answered
How do I convolve a periodic rect function with comb function
Another possibility is to download interpMatrix https://www.mathworks.com/matlabcentral/fileexchange/26292-regular-control-poin...

26 días ago | 0

Load more