Respondida
Find the intersection of a square pixel with a closed 2D curve
Doesn't consider below case (use intersect() if it matters to you): Only when nodes inside our outside (base on inpolygon()) ...

casi 7 años hace | 1

Respondida
Anyone have any tips to improve my code for findpeaks() so that I get only the first big peaks for each graph like those in transducers 10,13 and 1 but only one of them per graph? I want the first arrival time. Thanks.
If you want first peak use locs(1) If you want max peaks use max() If you want a few maximum peaks use sort() Did i understan...

casi 7 años hace | 0

Respondida
How to solve a system of two non-linear equations symbolically
Use matlabFunction() to make function handle from symboliv expression L0 = matlabFunction(L0); L1 = matlabFunction(L1); A = 0...

casi 7 años hace | 0

Respondida
Solving for ball trajectory with quadratic drag
'What I've noticed is that positions x,y,z don't even appear in my equations, so they are not used inside the function dxdt.' I...

casi 7 años hace | 1

| aceptada

Respondida
Helping to create animated wrapping line on a torus
Read about surf() and meshgrid() to plot torus Simple example for animation (actually it's just drawing new object in time) Re...

casi 7 años hace | 0

Respondida
Aircraft wing fuel tank modelling
Another way: Calculate the volume of a tank at some control levels % schematic algorithm if V < V1 Y_fuel ...

casi 7 años hace | 0

Respondida
How to calculate the distance, in pixels, between each centroid in a binary image.
pdist2 finds distances between every point (every possible combinations. Zeros in matrix means distance to points themselves) ...

casi 7 años hace | 1

Respondida
How to find the boundary points in one direction
What if just find() indices where x > 0.95?

casi 7 años hace | 1

| aceptada

Respondida
I know a certain y1 and I want to find the respective x1.
I'd use polyxpoly or intersections x = linspace(0,10,20); y = sin(x); y1 = 0.6; % find x at y=0.6 ...

casi 7 años hace | 0

Respondida
ode23 , matrix equation , 2nd order DE
You can find roots for x'', y'' and dtheta'' every iteration solving matrix equation function du = func(t,u) u1 = u(1:3)';...

casi 7 años hace | 0

| aceptada

Respondida
How to connect lines in a skeletonized image with arcs
Use bwmorph() to find branch points. I sorted them in counter clock-wise order: Find distance and center between neighbor poi...

casi 7 años hace | 0

Respondida
Find the set of 3d data parrallel to the current 3d data
Choose some points (P1,P2,P3) from your data - vector of the first line (blue) - some temporary vector between P2 and P3 poi...

alrededor de 7 años hace | 0

| aceptada

Respondida
How do I select the pixels outside my region of interest?
m = size(I,1); % number of rows n = size(I,2); % number of columns R = 100; % radius region [X,Y] = meshgrid(...

alrededor de 7 años hace | 1

| aceptada

Respondida
How to avoid painting outside the figure using linewidth
Use axis([xmin xmax ymin ymax])

alrededor de 7 años hace | 0

Respondida
How to get selected faces in a plotted 3D geometry
Try to change

alrededor de 7 años hace | 0

Respondida
2DOF Harmonic Oscillator - Is this right? (How would I do this with ODE45?)
What about ode45? % x(1) == xs % x(2) == dxs % x(3) == xm % x(4) == dxm % fun = @(t,x) [ Vs; d2xs; Vm; d2xm ]; fun = @(t,x...

alrededor de 7 años hace | 0

Respondida
Solving system of non linear equations of oscillating mechanism on ODE45
There is something wrong in your (3) equation. I'd first express (4), (5) and (6) like: And substitude it into (3): ...

alrededor de 7 años hace | 0

Respondida
Calulate width of every boundary point to majorAxisLength
Just count pixels in vertical direction with sum() I = imread('image.png'); I1 = im2bw(I); % binary image h ...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to simulate an ODE when one of the parameters is a function of time
Read how to Pass Extra Parameters in help ode23: sol = ode23(@(t,x)Eq(t,x,par),[0 Tfinal],x0); % solving the model Passing tra...

alrededor de 7 años hace | 0

Respondida
Numerical integral over the whole spherical volume of a crystallite
Suggestion: Use integral or trapz

alrededor de 7 años hace | 1

Respondida
Numerical integration with many parameters.
You forgot about element-wise operator delta=1-Mycp./100; Look also for VECTORIZE

alrededor de 7 años hace | 1

Respondida
Why doesn't this code rotate and transform the spiral?
Because you have to mulptiply each set of point separately ptsNew = zeros(size(pts)); for i = 1:1000 ptsNew(:,i) = mTrans...

alrededor de 7 años hace | 0

Respondida
how to calculate a ellipsoid arc and project it onto a plane?
I'd build a plane through 3 points (X,Y for plane surface and for ellipsoid surface must be the same) C = contour(X,Y,Zp-Zs,...

alrededor de 7 años hace | 0

Respondida
Generate a multiplicative cascade process
Probably should think about initial m, w, z m = 0.2; z = rand; w = rand; syms x y = -x-z-w+1; eq = x^2+y^2+z^2+w^2 -m; ...

alrededor de 7 años hace | 0

| aceptada

Respondida
Heat map visualizing touch pressure on smartphone in x-y space
I did my best, please like it

alrededor de 7 años hace | 1

| aceptada

Respondida
solving a system of ODE
Function looks okay except f/u1. Has to be (as instruction says): ydot = [(ps - p)/d + ppval(f,t))/u1 ... Read about ode45. Ma...

alrededor de 7 años hace | 0

Respondida
3D human body for temperature analysis
A lot of work has to be done clc,clear [x, y, z] = cylinder; surf(5*x,5*y,20*z*(1-0.5)) % main body hold on surf( z*7+2,x,...

alrededor de 7 años hace | 1

Respondida
How can I plot elliptical pressure distribution
You mean surface or pcolor? [x,y] = meshgrid(-5:0.5:5); Pmax = (3*N)/(2*pi*a*b); pn = Pmax*sqrt(1-(x/a)^2-(y/b)^2); surf(x,y...

alrededor de 7 años hace | 1

| aceptada

Respondida
How can I change what information is displayed when clicking on figure elements?
Try to change

alrededor de 7 años hace | 0

| aceptada

Respondida
Distance difference from center
I did this xyz0 = (mean(xyz)+mean(abc))/2; % O point XYZ0 = repmat(xyz0,size(xyz,1),1); % duplicate...

alrededor de 7 años hace | 0

| aceptada

Cargar más