Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Rapid PHP 2018 15.5
IBDAC 6.4
Online Course Booking Script 1.3.3
Database Workbench Pro 5.6.4
Job Portal Script 1.3.2
The C# PDF Library 5.2
PostgreSQL Data Access Components 6.0
Virtual Data Access Components 11.0
HTMLPad 2018 15.5
WeBuilder 2018 15.5
SentiMask SDK Trial 2.0.0
Track Order For Magento 2 1.0.0
Calendar 365 For Dynamics CRM 4.0
Scimbo 1.2
Odoo Furnito Theme 1.0
Top Code
PostgreSQL Data Access Components 4.4
Database Workbench Pro 5.6.4
Availability Booking Calendar PHP 1.0
Online Course Booking Script 3.04
ATN Site Builder 3.0
ATN Resume Finder 2.0
PHP Review Script 1.0
IBDAC 6.4
ICPennyBid Penny Auction Script 4.0
Invoice Manager by PHPJabbers 3.0
The C# PDF Library 1.0
Rapid PHP 2018 15.5
HTMLPad 2018 15.5
Classified Ad Lister 1.0
Azizi search engine script PHP 4.1.10
Top Rated
VisualNEO Web 2018.12.15
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
Recursive HYPOT Function for Multiple Inputs 1.0
File ID: 85441






Recursive HYPOT Function for Multiple Inputs 1.0
Download Recursive HYPOT Function for Multiple Inputs 1.0http://www.mathworks.comReport Error Link
License: Shareware
File Size: 10.0 KB
Downloads: 4
Submit Rating:
Recursive HYPOT Function for Multiple Inputs 1.0 Description
Description: Extension of the built-in MATLAB function hypot for multiple inputs.
MATLAB provides a function called hypot to calculate sqrt(abs(A).^2 + abs(B).^2) in a robust way to avoid underflow and overflow (see http://www.mathworks.com/help/techdoc/ref/hypot.html and http://en.wikipedia.org/wiki/Hypot). Frequently, though, I need to make this calculation with more than just two inputs A and B. Say, to compute the magnitude of a vector with three components (x, y, z). So I wrote this function to recursively call MATLAB's hypot function for multiple inputs:

Usage: Y = HYPOTR(X) or Y = HYPOTR(X1, X2, X3, ...)

This function works the same as the built-in MATLAB function hypot but allows for more than two inputs (or a single array) via recurssion. The output Y is:

Y = sqrt(sum(X(:).^2) (for single array X input)
Y = sqrt(X1.^2 + X2.^2 + X3.^2 + ...) (for arrays X1, X2, X3, ... input)

But the computation is done in a more robust way to avoid overflow and underflow (see HYPOT). Note that when multiple arrays are input, they must all be the same size (but any or all of them can also be scalars).

See also: HYPOT.

License: Shareware

Related: hypotrx, Works, Usage, matlabs, Components, wrote, Recursively

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 4



More Similar Code

Compute the erf or error function for complex inputs. Valid over the entire complex plane.



Connections in Web.Config for Multiple Computers is an article which describes the method for getting the connnection strings of the web.config file in different computers. The two functions given by the author helps you to get the machine name...



Bonferroni-Holm (1979) correction for multiple comparisons. This is a sequentially rejective version of the simple Bonferroni correction for multiple comparisons and strongly controls the family-wise error rate at level alpha.

It works...



For a system having multiple inputs x and outputs y, the partial coherence is the coherence computed between any individual input and the output when the effect of all other inputs is removed from the output by a linear least squares prediction....



I have written Flatten a few dozen times, and also searched the interwebs - I don't feel good about a heavily recursive function for Python, and some of the "type-sniffing" I saw in some codes seemed fishy - so I coded up this version....



The function deal2 is designated for multiple assignment. It is an extension of the function deal. The main differences between both functions are:
- deal2 need not have equal number of input and output arguments,
- deal2 makes all...



Function for calculaing period of a wave signals in pixels using Hilbert transform.
Single or multiple profiles can be used as input for calculating distribution of periods.



This script offers your users the ability to check or uncheck multiple boxes on a form.



ELLIPTIC12i evaluates the Incomplete Elliptic Integrals of the First, Second Kind and Jacobi's Zeta Function for the complex value of phase U. Parameter M must be in the range 0 <= M <= 1.

[Fi,Ei,Zi] = ELLIPTIC12i(U,M,TOL)



Several modifications to the standard boxplot/boxutil to allow for multiple box plots to be overlayed. In addition, standard line color and line width selection is available, as well as the filled option. This allows for color coding multiple box...

User Review for Recursive HYPOT Function for Multiple Inputs
- required fields
     

Please enter text on the image