Answered
how to do double integration including symbolic ??
If you are integrating a symbolic expression, you should use int() https://www.mathworks.com/help/symbolic/sym.int.html You sh...

5 years ago | 0

Answered
Is it the correct way to extract the value for the logical matrix?
Your screenshot shows that idx is type double, not logical. You can easily convert it, however: idx=logical(idx);

5 years ago | 0

| accepted

Answered
Scaling and rotating the image by selecting three known reference point in image
You could use drawpoint() or drawcrosshair(). This will return an object containing the position coordinates of the selected poi...

5 years ago | 0

Answered
Pass class selection to function
It seems to me your setup functions should be converted to class constructors that accept zero input arguments. There is no poin...

5 years ago | 1

| accepted

Answered
how to get coefficients by fitting power law for 4 variables ?
A=log([X(:),Y(:),Z(:)]); A(:,end)=1; abcd=A\log(U(:)); %the coefficients abcd(1)=exp(abcd(1));

5 years ago | 0

| accepted

Answered
how do i correct a Vector Function indices compatibility Error?
Did you mean, for i = 1:n F(i)= t(i); end

5 years ago | 0

| accepted

Answered
Populating 2D meshgrid of a function of four variables
As long as you don't care about efficiency, fun=@(x,y) Target([x,1,y,1]); Z=arrayfun(fun, XC1,YR1);

5 years ago | 0

| accepted

Answered
How to find specific areas in Voronoi plot? and how to enlarge the plot to choose small areas?
You should use polyarea().

5 years ago | 0

| accepted

Answered
How can I align text to the ylabel in a plot?
figure plot(1,1) yh = ylabel('label'); set(yh,'Units','Normalized','HorizontalAlignment','center','VerticalAlignment','middle...

5 years ago | 0

Answered
the values are less from eps
If you add to A a number less than eps(A), it will result in no change,e .g. A=175; A==(A+eps(A)/2)

5 years ago | 0

Answered
Change from 3d array to 4d array
Where P&Q aren't product of N. One way might be to reshape it so that P*Q=N and then resize it, using imresizen() for example, ...

5 years ago | 0

Answered
Is it possible in fmincon to limit the fval in the options?
No, but you can pose the bound on fval as a nonlinear constraint, and put it in your nonlcon function. Nonlinear constraints ca...

5 years ago | 2

| accepted

Answered
Loop over a list of variables indexed by numbers
Where your table is T, for i=1:2 DaySalesPerVisitor{i}=T{:,2*i}./T{:,2*i-1}; end Alternatively, A=table2array(T); DaySa...

5 years ago | 0

| accepted

Answered
How to plot a function graphically
n=1; fimplicit(@(x,y) y-x+(1/(2*pi))*sin(2*pi*(n-y))) xlim([-0.5,1.5]) ylim([-0.2,1.2])

5 years ago | 1

Answered
Not able to get desired curve fit in matlab using lsqcurvefit command.
Your model is linear with a very ill-conditioned coefficient matrix. load data xdata=xdata(:); A=[(1-exp(-xdata/1e-3)), (...

5 years ago | 0

Answered
What is the alternative function for evalin?
You could pass 'dataset' as an input argument to your function.

5 years ago | 0

Answered
Shade area between two curves
For example, x=linspace(0,2).'; yhigh=(x-1).^2+1; ylow=-x+0.5; h=area([ylow,yhigh]); set(h(1),'FaceColor','w','EdgeColor'...

5 years ago | 1

Answered
How to store RGB values of multiple images with separate variables?
Something like this perhaps. RGB=rand(256,256,3,10); %Images tmp=cellfun(@squeeze, num2cell(RGB,[1,2,4]) , 'uni' ,0); [R,...

5 years ago | 0

Answered
Reducing the distance among subplot figures?
Here is yet another FEX offering that allows flexible control over subplot spacing: https://www.mathworks.com/matlabcentral/fil...

5 years ago | 0

Answered
How to plot multiple curves in a single figure by varying a parameter?
for c=1:5 fimplicit( @(x,y) y.^2/2-cos(x) - c) hold on end hold off xlim([-5,10])

5 years ago | 0

Answered
How to find relative camera pose from homography matrix
You might also have a look at the relativeCameraPose() command. According to its documentation, https://www.mathworks.com/help/...

5 years ago | 0

Answered
How to find relative camera pose from homography matrix
Yes, it's from a moving drone. This means that the camera center is moving. Two images from cameras with different centers cann...

5 years ago | 0

Answered
Find first k largest elements?
The efficient way would probably be to use a File Exchange MEX alternative to maxk() like this, https://www.mathworks.com/matla...

5 years ago | 0

| accepted

Answered
MATLAB's fsolve: which equation-solving algorithm to choose?
or should the fact that TRD failed to solve effectively worry me? No. Some algorithms are simply better suited to certain prob...

5 years ago | 0

| accepted

Answered
Parfor and symmetric matrix
[I,J]=ndgrid(1:m,1:n); keep=J>=I; I=I(keep); J=J(keep); parfor k=1:numel(I) i=I(k); j=J(k); opera...

5 years ago | 0

Answered
Grouping vector data based on different intervals
Sounds like it would be better to have your data organized as a 24x365 matrix instead of as a vector. A=reshape(data,24,365); ...

5 years ago | 0

| accepted

Answered
Excluding data points from optimization process using createOptimProblem function
Instead of using lsqcurvefit's calculation of the residual error, why not do your own cusotmized calculation after the optimizat...

5 years ago | 0

Answered
Reconstruction of image from the vectorized overlapped blocks of an image
matrix=rand(64,3969); %initial data temp=reshape(matrix,8,8,63,63); temp=num2cell(temp(:,:,1:2:end,1:2:end),[1,2]); rea...

5 years ago | 2

Answered
Return logical for rows of non-zero numbers for specified columns (similar to "all" function)
For example, if I wanted all rows where columns 1 and 3 are non-zero This would be, all(mat(:,[1,3]),2)

5 years ago | 1

| accepted

Answered
Matrix and array indices
Presumably your N_Lon and N_Lat values are not positive integers.

5 years ago | 1

| accepted

Load more