This simple code calculates the convex hull of a set of 2D points and generates EPS files to visualise them. The algorithm was taken from a textbook on Computional Geometry.
You want to replace that portion of a string at a given position.
Grab a part of a web page and generarte a new page with a base href to the source server, so that relative links will still work.
How to obtain the name of a method or a function from within the running method/function.
Acknowledgement: the solution to this problem is given by Christian Tismer (tismer@tismer.com; Mission Impossible 5oftware)
The following function creates a map of all members of a class, navigating ALL of the base classes in the correct order. This can be used for various purposes, like checking whether a certain method is defined anywhere in a class hierarchy.
Python has no equivalent to Java's "super" keyword (so that some part of a method can be delegated to the superclass), but it's easy to get similar convenience despite Python's multiple-inheritance generality.
Finding the Fourier transform of a rectangular pulse.. filtering the spectrum and regenerating the signal using the filtered spectrum is done... at the end Rayleigh theorem is proved by showing that the energy content of both time...
This demo shows how to use MATLAB, Optimization Toolbox, and Genetic Algorithm and Direct Search Toolbox to optimize the design of a double wishbone suspension system.
Note: You will need to have the following products installed in...
n the bottom of a Stefan tube there is a quiescent liquid with a mixture of acetone (component 1) and methanol (component 2). Vapor that evaporates from this pool of liquid diffuses to the top of the tube. Air (component 3) keeps the mole...
This model simulates the position control of a DC motor. Parameters can be changed from the model properties tag.
Multi-domain model of a steel rolling mill stand with elements for the roll & plate, hydraulic system, and electrical motors. Also includes a saved sisotool session with a multi-loop controller design to control plate thickness and velocity....
The code computes the velocity profile for the vertical laminar flow of a Bingham fluid down a wall. As expected the profile is flat near the surface of the liquid film. In fact, we have a zero velocity gradient only when the shear stress is large...
Simulation of a model of DC motor, driven by constant input signal that approximates a pulse-width modulated(PWM) signal and look at the current and rotational motion at the motor output using Simulink. It uses SimElectronics and Simscape too.
Equations of motions of a Cessna are modelled in this matlab GUI. Cessna levels of to a steady level flight at 10.5 kms. Four plots show (a) Alt Vs Time. (b) Alt Vs G. (c) Vel Vs Tim. (d) Flight path angle Vs Time. Other plots like Range, Ceiling,...
The standard problem of a Two Link Manipulator is developed both kinematically and dynamically. It is then controlled to trace a rotated ellipse. The non-linear terms (like gravity/inertia etc.) are exclusively canceled out in varying degrees and...
The velocity and shear stress versus radial position are obtained for the laminar flow of a power-law fluid in a pipe. Pipe radius and applied pressure gradients can be set by the user. If you choose a power-law exponent, n, equal to 1 then a...
Computes the distance 2-point correlation function of a finite 2D lattice. The functions is:
[ coorfun r] = twopointcorr(x,y,width,height,dr)
Where x is the list of x coordinates of lattice points. y is the list of y...
Program given here computes the discrete transfer function of a DC motor (Example taken in this case) using pseudo inverse technique. The input and output data for any single input single output system can be used to find out the discrete transfer...
This function uses the Vincenty direct algorithm to solve the "forward geodesic problem," which is the problem of computing the endpoint of a geodesic (shortest-distance) path on the ellipsoidal earth, given the start point, a path...
Extracts the edges of a color image without converting it to grayscale.
Changes in color are detected even when the grayscale color of two pixels are the same. The edge strength is typically greater or equal to the magnitude obtained by... |