Answered
How can I change for-loop into matrix way?
This gives some speed-up. %Fake Data m=100;n=1000; B=rand(15,1); D=rand(3,1); A=B(randi(15,m+1,n)); E=D(randi(3,m+1,1))...

5 years ago | 0

| accepted

Answered
How to check whether multiple variables are numeric using a loop
varname=D_mat_search(aa); if exist(varname,'var') && isnumeric(eval(varname)) && isfile(File_loc_ID) %BAD

5 years ago | 0

| accepted

Answered
OOP: Reference (subclass) enumeration names from static superclass method. Possible?
No, you can't unfortunately, but you can avoid copying the method to all the sub-classdef's just by making doWork() an external ...

5 years ago | 1

| accepted

Answered
How to fill a volume plot of a vector valued functions (with 3 variables)
See quiver3. https://www.mathworks.com/help/matlab/ref/quiver3.html

5 years ago | 0

Answered
How to find the polynomial equation when factors is provided?
p = poly([-7,19,18,-17])

5 years ago | 1

Answered
Percentile calculation along time
T=cat(3,A,B,C,D,E) ; prctile( T ,50,3 )

5 years ago | 0

| accepted

Answered
Help: Using fminsearch to calculate fractional derivatives
Your optimization problem appears to be an unconstrained, linear least squares minimization. I don't see why you need an iterati...

5 years ago | 0

Answered
Angle of lines in binary image
It may be helpful to use linear2dFit from this FIle Exchange package https://www.mathworks.com/matlabcentral/fileexchange/87584...

5 years ago | 1

Answered
Fitting exponential curve in data
A more efficient and direct way would be to use fminspleas (Download) load data funlist={@(tau,t)exp(-t/tau),1}; idx=tdat...

5 years ago | 0

Answered
How to plot 2 lines and find the coordinates of their intersection?
Using this File Exchange submission, https://www.mathworks.com/matlabcentral/fileexchange/93470-intersections-of-multiple-2d-li...

5 years ago | 0

Answered
How can I fit an ellipse in 3D space to find it's center coordinates in (x,y,z)?
Basically, the procedure would be to Fit a plane to your data. Project your (x,y,z) data on to the plane and write the resul...

5 years ago | 3

| accepted

Answered
How to get the max orthogonal (perpendicular) distances from a set of coordinates
I created an alternative to polyxpoly here, https://www.mathworks.com/matlabcentral/fileexchange/93470-intersections-of-multipl...

5 years ago | 1

Answered
problem with VPASOLVE and FSOLVE
No, your equations don't have closed-form solutions. In any such situation, you will have to provide an accurate initial guess t...

5 years ago | 0

| accepted

Answered
3D matrix with equation
If it helps, I need to sum over index i afterwards, so this will reduce the dimensions again afterwards. Don't multiply-then-su...

5 years ago | 0

| accepted

Answered
Fmincon gives Exact the same Answer as the initial guess
Because of the round() operations, your objective function is locally flat (i.e., has zero gradient) almost everywhere. Therefor...

5 years ago | 1

| accepted

Answered
why hough transform detects more lines while there is only one line?
Because your line is actually not a line, but rather a tube with non-zero thickness, there are multiple thinner lines that will...

5 years ago | 0

| accepted

Answered
Create sperate matrices for all unique values in the 3rd column of a cell array
Well, I won't talk about creating separate arrays because it's bad, but here's what you could do which wouldn't be bad: initia...

5 years ago | 0

| accepted

Answered
pre-define a struct/array of structs in attempt to get rid of out of memory error.
It is not at all clear from what you posted why you might run out of memory, nor why you get the error message you have posted, ...

5 years ago | 0

| accepted

Answered
Large scale linear algebra
When you store an MXN real double matrix in full form, you can expect that its matrix data will consume 8*M*N bytes. For a compl...

5 years ago | 0

Answered
Is there a more efficient way to compute this other than using a loop ?
b=setdiff(b,a,'stable')

5 years ago | 1

| accepted

Answered
Large scale linear algebra
whos will work if you want the memory consumption of any variable including its metadata. A=rand(10); whos A Note that this...

5 years ago | 0

Answered
How to Separate Connected Objects in an Image
This might help: https://blogs.mathworks.com/steve/2006/06/02/cell-segmentation/ https://www.mathworks.com/company/newsletter...

5 years ago | 1

| accepted

Answered
Solving poor convergence issues using lsqcurvefit
There's nothing wrong with the fit. You're just plotting it incorrectly, scatter(x_data,SR_fn(x,x_data),'b') %<-- shoul...

5 years ago | 0

| accepted

Answered
How can i solve the issue of struct2table
I don't know why you think struct2table is relevant to this problem if intlinsol is not a struct. You have also not described ho...

5 years ago | 0

Answered
Access to matrix elements
A = magic(4) B = [2 1; 3 3; 2 4] ; C=A( sub2ind(size(A), B(:,2), B(:,1) ) ).'

5 years ago | 0

| accepted

Answered
clustering and pixel count
Yes, regionprops(___,'Area')

5 years ago | 0

Answered
How to optimize the rows of a vector given by a self-built function?
but what I want to do are independent optmizations on each line of Q. Ideally, you would modify buildQ to let you restrict comp...

5 years ago | 0

Answered
Image Analysis - Inside Bounding Circle
Use bwboundaries() to get the boundary coordinates and use incircle() from here: https://www.mathworks.com/matlabcentral/fileex...

5 years ago | 0

Answered
How to optimize the rows of a vector given by a self-built function?
This sounds like it should be an easy task Not to me. Is Q(1), Q(2), ...,Q(N) each a function of a different, non-overlapping,...

5 years ago | 0

Answered
how to segment the gray scale image from background
If the purpose here is to do automatic semantic segmentation of many horse images, you will probably need to train a convolution...

5 years ago | 0

Load more