Submitted


3D Rotation about Shifted Axis
Computes/applies rotation about arbitrary 3D line.

5 years ago | 6713 downloads |

5.0 / 5

Answered
Why Matlab cannot calculate simple double integrals with good accuracy?
I'm guessing that numerical accuracy might suffer because the integrand is discontinuous, and the curved boundary of the discont...

5 years ago | 0

Answered
Calculate from a circle in an image in MATLAB
You can use drawcircle() to do it interactively, https://www.mathworks.com/help/images/ref/drawcircle.html h = Circle wi...

5 years ago | 0

Answered
Improving the speed of code with passing to a function input a cell array or structure.
We can't see what famplifire [sic.] is doing with your variables so there isn't any specific comments that can be made. However,...

5 years ago | 0

| accepted

Answered
Combine lsqcurvefit with fsolve
I would just use lsqnonlin. theta2 = [0.53,0.40,0.32,0.28,0.27,0.27,0.28,0.29,0.31,0.34,0.36,0.40,0.43,0.47,0.50,0.55,0.59,0...

5 years ago | 1

| accepted

Answered
Specify number of ones in each row and column in binary matrix
A=kron(eye(324),ones(3,6)); A=A(randperm(972), randperm(1944));

5 years ago | 0

| accepted

Answered
correction in order of elements in matrix obtained from reshape array
A loop-method, A=[4 4 4; 8 8 8]; B=[16 12 8]; c=min(A,B(1,:))./max(A,B(1,:))

5 years ago | 0

| accepted

Answered
correction in order of elements in matrix obtained from reshape array
A=[4 4 4; 8 8 8] B=[16 12 8] [mA,nA] = size(A); [mB,nB] = size(B); index=0; for j=1:nB for i=1:mA index=index+1; ...

5 years ago | 0

Answered
Working with a set of matrices
I'm not sure I will fully understand the task without seeing an example. However, if S is organized as an MxNxP array, [M,N]=d...

5 years ago | 0

| accepted

Answered
What is the advantage of Help with web connection
It could make sense to give users access to the most up-to-the minute documentation by default. For example, any documentation b...

5 years ago | 0

Answered
Shortest path constrained to use specific nodes
Why not just analyze a subgraph with the inadmissible nodes removed: cut=setdiff(1:numnodes(G),nodes); Gsub=rmnodes(G,cut);

5 years ago | 1

Answered
How to convert cell array containing text to numbers?
I don't think there is any solution that will work without any assumptions about the alphabetic content of the cells. Here, I as...

5 years ago | 1

| accepted

Answered
I want to reduce the width of certain plots in a subplot from other plots.
It can be done using the Postion or OuterPosition axes property, e.g., for i=1:3 ax(i)=subplot(3,1,i); plot(rand(1,5)...

5 years ago | 0

| accepted

Answered
Different rows height in tiled layout
Another solution would be to use nested tiledlayouts, e.g., m1=[5,6]; m2=[1,1,1,2]; T=tiledlayout(5,1); %Outer layout ...

5 years ago | 1

| accepted

Answered
Error using fsolve (line 287) FSOLVE requires all values returned by functions to be of data type double.
Get rid of '==0' F(1) = ((Tfout - x(2))/(Tfout - x(1))) - 1 + exp(-NTUe) ; F(2) = Qg - ((COPHP + 1)/COPHP) * Qu;

5 years ago | 1

| accepted

Answered
Using narrower property validation definitions in subclasses + using an abstract class for property validation
There is a lot to unpack in your question, but basically the solution I would recommend is that you make the abstract property a...

5 years ago | 0

| accepted

Answered
Extract elemnts from a matrix and put them in a new one
Using the attached file sortlidx.m M=[ 0.45 5.45 0.64 0.78 0.32 3.65 0.79 0.56 0.23 0.11 0.21 6.78 ...

5 years ago | 0

Answered
Build a matrix from matrix in a cell array
load(websave('t','https://www.mathworks.com/matlabcentral/answers/uploaded_files/570494/RT-4.4-Dprony.mat')) M=cat(3,K_4{:});...

5 years ago | 0

| accepted

Question


Why is polyshape.isinterior() so much slower than inpolygon()?
In my tests below, polyshape.isinterior demonstrates much poorer speed performance than inpolygon. Any ideas why that might be, ...

5 years ago | 0 answers | 1

0

answers

Answered
Looking for faster inpolygon - testing whether points are inside a polygon
Because your polygons are convex, you can obtain the inequality representation A*x<=b of each polygon and then do X=[x1,y1,z1; ...

5 years ago | 0

Answered
Graph/Draw hyperboloid
You might consider this very similar example, using cylinder(), https://www.mathworks.com/help/matlab/ref/cylinder.html#mw_1c93...

5 years ago | 0

| accepted

Answered
How can I plot around 1000 surfaces in 3D and with good speed?
You can keep the axes invisible until all surfaces have been added. https://www.mathworks.com/help/matlab/ref/matlab.graphics.a...

5 years ago | 0

| accepted

Answered
Unable to find explicit solution
You can use fimplicit.

5 years ago | 1

| accepted

Answered
HOW I CAN FIND THE ROWS ARE IDENTICAL IN 10*10 MATRIX
You can get a label map of all identical rows by doing, [~,~,labels]=unique(yourmatrix,'rows') or C=num2cell(yourmatrix,1); ...

5 years ago | 0

Answered
How to write a conditional statement for tridiagonal matrix.
a = [3 4 0 8]; validateattributes(a,"numeric", "nonzero")

5 years ago | 0

| accepted

Answered
How can I create a mask using multiple ROI?
len = length(r); mask = false(size(bw_img)); for count = 1:len h = drawcircle('Center',[x(count) y(count)],'R...

5 years ago | 0

| accepted

Answered
How do I use multiple matrices?
DewpointT= T(:) - (100-RH/5)

5 years ago | 0

Answered
ellipse fitting from a plot in MATLAB
Theta should come araound zero degree but it is giving 68 degree and 44 degree. Using ellipticalFit() in, https://www.mathw...

5 years ago | 0

Answered
How to calculate amount of connected pixels in blob of an intensity image
area=bwarea( bwareafilt(intensityImage>1,1) )

5 years ago | 0

| accepted

Load more