Answered
Planes and vectors in 3d
Clearly they all cut the plane since their z-components are all greater than 1. More generally, if P is a point, plug t*P into ...

3 years ago | 0

Answered
Fixing fzero in standard normal distribution
Note that your problem has a closed-form solution, i.e. fzero is not necessary: X = 440; Z = -2.33; syms n; assume(X-500*n<=...

3 years ago | 1

Answered
alternatives to gradient-based optimization algorithms like lsqnonlin that handle at least O(10) parameters?
it seems that this class of optimization algorithms can handle a small number of parameters (10,...,20) well, but are not approp...

3 years ago | 1

| accepted

Answered
How to calculate the point belonging to a line from an exterior point and a distance between the exterior point and the desired point
There are two such points: Xa= 141.056072111132; Ya= 2.466917308864894e+03; Xb= 137.926340439225; Yb= 2470.81925749382; ...

3 years ago | 0

Answered
Optimize Center of Circle given noisy data points on arbitrary Plane?
Go to the examples tab of this FEX submission https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-...

3 years ago | 0

Answered
How to combine desired cropped image to another image?
You can adjust the AlphaData property of the image to make certain regions of the mask image transparent.

3 years ago | 0

Answered
splitapply with multiple output variables
quantGroups = findgroups([locAwayFromMean{:,12}]); % grouping info as vector X=cell2mat(locAwayFromMean(:,11)); I=1:numel(...

3 years ago | 0

| accepted

Answered
Is it possible that, given the same problem, fmincon finds a solution and intlinprog does not?
Your constraints are not feasible, as can be seen by looking at inequalities 4,15, and 23. A=A([4,15,23],:); B=B([4,15,23],:); ...

3 years ago | 1

| accepted

Answered
Input data must be a formatted dlarray.
You have not provided us the means to run your code (implementation of modelLoss is missing as is a sample of the input data). H...

3 years ago | 0

| accepted

Answered
Time-domain convolution doesn't match Frequency-domain multiplication in MATLAB
Note that conv() implements linear convolution, not circular convolution.

3 years ago | 0

| accepted

Answered
How can I find index from a 3D matrix?
M=rand(376,268,764); d = [1, 3, 45, 56, 111, 121, 135, 440, 489, 491, 511, 555, 569, 599, 608, 700]; Md=M(:,:,d); whos M ...

3 years ago | 1

| accepted

Answered
Is properties like global variables?
No, they are not like global variables. They are attached to the app object used by the callbacks and must be accessed similarly...

3 years ago | 0

Answered
How can I select a three dimensional diagonal from a three dimensional array?
out=M( sub2ind(size(M), IX,IR,1:N) );

3 years ago | 0

| accepted

Answered
Image processing of a binary image
load BWimage BW0=BW; BW=imerode(BW, strel('disk',3)); BW=bwpropfilt(BW,'Eccentricity',[0,0.3]); BW=imdilate(BW, ...

3 years ago | 0

Answered
i would like to plot an iterative function
For example, k=linspace(3.5,4.0,5); x=0:0.0001:1; for i=1:numel(k) f =k(i).*x.*(1-x); plot(x,f); x...

3 years ago | 0

Answered
frequency domain convolution problem
You have only generated half a sinc, rather than a full sinc from -infinity to +infinity. Keep in mind as well that there will ...

3 years ago | 1

| accepted

Answered
fsolve issue with high gradient function
You should not be using fsolve for a 1D root finding problem, and particularly not when the function is highly non-differentiab...

3 years ago | 0

Answered
I want to compare fit() using option 'sin1' with the same equation defined using 'fittype'.
How do I make 'fittype' robust to a wide range of (noisy) data and different starting points. The standard option using fit() a...

3 years ago | 0

| accepted

Answered
How I can find intersection point of direction vector and one of the given plane of 3d cube
Fairly eay to do to do with this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/30892-analyze-n-dimensional...

3 years ago | 0

| accepted

Answered
Regression line that includes x and y errors.
I would recommend linear2dFit() form this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/87584-object-orien...

3 years ago | 0

| accepted

Answered
Extract data from columns based on a range from one column.
A=readmatrix('data.xlsx'); starts=find(A(:,3)==0); stops=find(A(:,3)==99); N=numel(starts); assert(numel(stops)==N, 'Miss...

3 years ago | 0

| accepted

Answered
Help creating a Multi-Input CNN with 4D array images for Multi-Channel EEG analysis ?
I know nothing about EEG signal processing, but it seems to me that you should just view the inputs as 299x299 images with 48 ch...

3 years ago | 0

Answered
Loop for issue in me script
clear; clc; A=[1 0 0 -1 0 0; 1 0 0 0 0 0; 0 1 0 0 -1 0; 0 3 0 0 -1 -1; 0 0 1 0 0 -2; 0 -1 1 -2 0 0]; i=1; while 1 B=[...

3 years ago | 0

| accepted

Answered
How to avoid writing a for loop in A\b when A and b are different dimensions
soln=pagemldivide(A,reshape(b,[],1,Nx)); soln=soln(:,:).';

3 years ago | 1

| accepted

Answered
least square curve fitting on a nonlinear equation , set of data available
I would recommend this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/10093-fminspleas fun={@(b,x) (1-exp...

3 years ago | 0

Answered
Optimization of matrix calculations for loop & if statements
[m,n]=size(dx); dX=( dx( [m,1:m,1] , [n,1:n,1] ) ).^2; k=0.25*kappa/dz^2*[0 1 0; 1 0 1; ...

3 years ago | 1

| accepted

Answered
putting conditions on the axis intervals in fsurf
gamma=0.5; rh=linspace(0,3,200); rl=linspace(0,2,200); [Rh,Rl]=meshgrid(rh,rl); p=(gamma*Rh+ (1-gamma)*Rl)/2; p(Rh<Rl)=...

3 years ago | 0

Answered
Trouble with optimization options - equation problem example
options = optimoptions(prob); options.Display='off'; [sol,~,~] = solve(prob,C0,'Options',options);

3 years ago | 0

| accepted

Answered
How do I remove points which are far away from the boundary of domain?
Question : what can i do to remove any points which are out of the boundary nodes ? Use inpolygon to detect which points are wi...

3 years ago | 0

| accepted

Answered
how make a plot where both x and y are varying?
For example, C=(1:10)'; B=linspace(1,4,5); D=1; A=B.*C.*D plot(C,A); legend("B="+B)

3 years ago | 0

Load more