Answered
Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element
if ~isempty(NextConnection) NextConnection.packet_allocated_bandwidth = 200; else ...something els...

3 years ago | 0

| accepted

Answered
Plane plotted with fimplicit3 fails to render
MathWorks Tech Support has classified this as a bug (Case #06788114)

3 years ago | 0

| accepted

Answered
How I can count the number lines falling inside the green region
green=polyshape(vertcat(M.ncst)); Lines=findobj(gca,'Type','line'); clear insideGreen for i=numel(Lines):-1:1 ...

3 years ago | 0

Answered
How to update Matlab?
You can download and install R2023b without un-installing R2022b. The two will co-exist as separate apps on your computer.

3 years ago | 0

Answered
Customized 3D vector representation
The graphical element you describe can be created from a combination of a cylinder (the shaft of the arrow), a cone (the head of...

3 years ago | 0

| accepted

Answered
Generating an alpha shape with a predetermined connectivity list
No, it's not possible. For a given set of points, the connectivity lists of its alpha-shapes are a 1D function of the alpha radi...

3 years ago | 0

Answered
Adoption of Name=Value in Function Calls what is best practice?
The only consideration I can think of is if you might need to run your code on an older version of Matlab that predates the new ...

3 years ago | 0

Answered
Reshaping is causing memory problem
Don't make long sparse row vectors, as these do consume lots of memory. Work with column vectors instead: K_flatten = K_i(:);

3 years ago | 1

| accepted

Question


Plane plotted with fimplicit3 fails to render
load data E C ax planefun=@(x,y,z) E(1)*x+E(2)*y+E(3)*z+E(4); In the plot below, I successfully plot a point C and try to supe...

3 years ago | 2 answers | 1

2

answers

Answered
Create a node in the space between two nodes (A and B) and following the direction normal to a node (N)
I might be misinterpreting your question somehow, but from your figure illustration, it doesn't make sense that you would be su...

3 years ago | 0

| accepted

Answered
Linear Equation Solving, I am getting the wrong output
Your equations system is singular, so no surprise that there is more than one solution. [A,b]=equationsToMatrix([EQN_1;EQN_2]) ...

3 years ago | 0

Answered
Plotting multiple 2D alphaShape polygons with different z-values
th = (pi/12:pi/12:2*pi)'; x1 = [reshape(cos(th)*(1:5), numel(cos(th)*(1:5)),1); 0]; y1 = [reshape(sin(th)*(1:5), numel(sin(th)...

3 years ago | 0

| accepted

Answered
Differences in results of calculating the mean value
However, now I'm gonna need to keep the variables in 2D format Her's one way you could have done that without introducing NaNs:...

3 years ago | 0

| accepted

Answered
assume can't constrain vpasolve
There doesn't appear to be any good reason for you to be using sym variables. Your code doesn't seem to make use of any other S...

3 years ago | 1

Answered
how to velocize it (avoid loop is possible)
E=[0 5 6 9 2;0 0 1 3 1;0 5 4 2 4]'; [~,I]=max(logical(E),[],1); filtro=(1:height(E))'>I

3 years ago | 0

| accepted

Answered
Plot a set of points in a standard simplex
For 2D: p=nsidedpoly(3); c=rand(10,3); c=c./sum(c,2); v=num2cell(c*p.Vertices,1); %"probability vectors" plot(p); axis...

3 years ago | 3

Answered
Set tick in Axes plane
That's pretty fancy. But no, I'm pretty sure Matlab doesn't have it.

3 years ago | 0

Answered
Faster Image Processing?
[m,n,p]=size(Image); N=cellfun(@numel, pointer(:)); K=cell2mat( cellfun(@(q)q(:)', page(:),'uni',0)); %*ConstantMultipli...

3 years ago | 0

Answered
Reduce the objective function value in fmicon
For this objective function value is coming in the order of e+10 You seem to think this value is large and far from the optimum...

3 years ago | 1

Answered
The fastest method to perform sum of function
dx = 0.1; dy = 0.15; dz = 0.05; xmin = -2; xmax = 4; ymin = -2*pi; ymax = 2*pi; zmin = -1; zmax = 2; xs = xmin:dx:xmax;...

3 years ago | 0

Answered
train a Neural network with different input output sizes
If it's a sequence-to-one regression then this syntax of trainNetwork would be appropriate, net = trainNetwork(sequences,respon...

3 years ago | 0

| accepted

Answered
Extrapolating x from a given y value using a curve-fitted cfit equation.
x=fzero(@(z) val(z)-y, z0)

3 years ago | 1

Answered
Two-variable optimization with additional conditions
The constraint is equivalent to minimizing over the intersection of the unit sphere and a plane through the origin (normal to n0...

3 years ago | 0

Answered
What could be the reason for this fzero error and how to solve it ?
You should plot the function to get a better idea where the solution is, dd = 0.1069; vv = 0.7889; L = 1; fun = @(aa) ( (...

3 years ago | 1

Answered
How to change size of plot points
savtotal=1000; % initial amount hold on xlabel("Time (Months)") % graph labels ylabel("Amount Saved ($)") title("College Sav...

3 years ago | 0

| accepted

Answered
How to apply for loop in case of product of function inside double summation?
The most efficient approach, especially as a and b become longer, is to separate the sums, leading to a one-line computation: P...

3 years ago | 1

Answered
Remove points in a 3D matrix that lie inside a 2D polygon on each layer
and effectively eliminate a column from the mri by adjusting the values of all points within that same polygon to 0 on every sli...

3 years ago | 0

| accepted

Answered
How to segment a matrix into N regions with sizes XYZ?
I'm not sure how to do an area-preserving transformation in Matlab See imwarp.

3 years ago | 0

Answered
Need help graphing gradient of 2D polynomial
[Gx, Gy] = differentiate( sf, X, Y ); figure; surf(X,Y,Gx); title('X-Gradient') figure; surf(X,Y,Gy); title('Y-Gradient')

3 years ago | 0

Load more