Answered
Matlab help is not working
Make sure that you are not overriding any functions called by help.m with mfiles of your own. For example, if you have your own ...

8 dagen ago | 0

Answered
Index in position 1 exceeds array bounds (must not exceed 2).
How can To(t,1) make sense when t becomes greater than 2? To is only a length 2 vector.

8 dagen ago | 0

Answered
finding the distance between points of boundaries
If you have the Statistics Toolbox, you can pdist2 https://www.mathworks.com/help/stats/pdist2.html D = pdist2(Red,Green)

8 dagen ago | 0

Answered
How to accurately find angle between these two vectors ? (Data Provided).
function [theta, Nrm]=vecrot(vstart,vend) %Find rotation carrying one vector toward another about their common perpendicular ...

8 dagen ago | 0

| accepted

Answered
How can one create this matrix, part 3
[X, Y, Z] = ndgrid( 1:.1:1.5., 0:.1:0.5, 0:.1:0.5); [Z(:), Y(:), X(:)]

8 dagen ago | 0

| accepted

Answered
How to find a specific value from a matrix having columns within columns
You haven't mentioned in what form you are holding this data, but my recommendation would be to hold it as a 3x4x5 matrix, A. Th...

9 dagen ago | 0

| accepted

Answered
Image denoising using uniform cubic b spline
Have you tried csaps? https://www.mathworks.com/help/curvefit/csaps.html

9 dagen ago | 0

Answered
How do I create a sliding window and/or bin that records the number of elements over a given time period
t1 = 20; %start time, seconds t2 = 30; %end time, seconds win=tim_trl>=t1 & tim_trl<=t2; time = tim_trl(win); %10s window ...

9 dagen ago | 0

| accepted

Answered
Linear Constraint Fmincon Function Form
I have currently created a nonlcon function for it but it is linear so I don't know the effect of doing this? There's nothing ...

9 dagen ago | 0

Answered
How to calculate mean in moving cubic volume?
I know I need to use mat2cell and mean function. I don't think you do. Let's call your 3D volume, V: [ci,cj,ck]=deal(51,51,251...

9 dagen ago | 0

| accepted

Answered
I'm looking if there anyone can share with me the code of optimization with multi-objective?
The best place to look for shared code is on the File Exchange. I see there is at least one MPSO offering here, https://www.mat...

9 dagen ago | 0

Answered
How to know the current input for fminsearch?
You can use an OutputFcn, https://www.mathworks.com/help/matlab/math/output-functions.html#bsgue2z or simply add a line of cod...

9 dagen ago | 1

| accepted

Answered
K-th order neighbors in graph
function result=distk(G,i,k) % G -graph % i - start node % k - number of steps A=adjacency(G); v=A(i,:); ...

10 dagen ago | 1

| accepted

Answered
Smooth derivative of a matrix
So my question is: is there any way to smoothly connect the eigenvectors of neighbouring k points? Not in general. The eigenvec...

10 dagen ago | 0

Answered
Second order polynomial curve of best fit
It probably happens because you've chosen too arbitrary an initial guess constant=[0;0;0]. It's clear from your data that these ...

11 dagen ago | 0

| accepted

Answered
Error - Failure in initial objective function evaluation. FSOLVE cannot continue.
Second, I'm not sure why fsolve is having trouble parsing the initial guess. This is not a separate error. fsolve is simply te...

11 dagen ago | 1

| accepted

Answered
can matlab find the row space and null space of a matrix?
Yes, the solution could involve the commands orth() and null().

11 dagen ago | 0

Answered
Subfunctions in optimization objective function
fmincon does not know or care about the internals of your objective function code. You can do anything there, and call whatever ...

12 dagen ago | 1

| accepted

Answered
Getting meshgrid along different angles for data extraction from a matrix/image?
If you're just trying to generate shaded polygons, it would be simpler just to use impoly, e.g., x0 = 1; y0=1; x1 = 200; y1=50...

12 dagen ago | 0

| accepted

Answered
How can I remove the lines that are not in the cross section of the annulus?
figure(1); % add lj line to temperature profile hold on; for ii...

12 dagen ago | 2

| accepted

Answered
How to construct all possible combinations of points in N-dimensional space
X=[x1,x2,x3].'; Y=[y1,y2,y3].'; [I,J]=ndgrid(1:3,4*(0:N-1) ); P=[X(I(:)),Y(I(:)), J(:)]; d=pdist2(P,P);

12 dagen ago | 0

Answered
how to draw the intersection of 3 3d objects?
One of these FEX submissions might be helpful, https://www.mathworks.com/matlabcentral/fileexchange/48613-surface-intersection ...

12 dagen ago | 0

| accepted

Answered
How to check if object's property is read-only.
You can obtain that information from a metaclass object for the class, https://www.mathworks.com/help/matlab/matlab_oop/using-c...

12 dagen ago | 0

| accepted

Answered
Comparing elements in a 2d array
>> peak = [0, diff(array(1:end-1))>=0 & diff(array(2:end))<=0 , 0] peak = 0 1 0 0 0 1 0 >>...

13 dagen ago | 0

Answered
Improving and Optimizing Blurring Function
Using sepblockfun from the File Exchange, https://www.mathworks.com/matlabcentral/fileexchange/48089-separable-block-wise-opera...

13 dagen ago | 1

| accepted

Answered
Nonlinear equation numerical solution
I tryed also with functions: fsolve, roots and find but were all unsuccessful. fsolve is overkill for such a simple 1D problem....

13 dagen ago | 1

Answered
How to find out zeros and their indices in a matrix?
One way is to use this FEX submission, https://www.mathworks.com/matlabcentral/fileexchange/78008-group1s H=group1s(~input(2,:...

13 dagen ago | 2

Answered
Is there a way to do these matrix vector multiplications without loops?
First, you would choose a different ordering. Instead of A = rand(m,n,4,4); v = rand(m,n,4); you would have A = rand(4,4,m,...

14 dagen ago | 1

| accepted

Answered
Optimizing systems of non-linear equation using optimvar and lsqcurvefit
Avoid sqrt so as to ensure fun is differentiable fun = @(x,xdata) [((1+4.*xdata.^2.*x(1)^2).^(-2) + x(4))./((1+4.*xdata.^2.*x(2...

14 dagen ago | 0

Answered
How can I do 1D convolution on a 880*1 feature with filter size 45*1 with stride of 42?
You can create a weight matrix that computes the convolution using func2mat on the File Exchange https://www.mathworks.com/matl...

15 dagen ago | 0

Load more