Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.043.626 Times

A multi conditional goto-like implementation in Matlab 1.0

  Date Added: July 14, 2013  |  Visits: 205

A multi conditional goto-like implementation in Matlab

Report Broken Link
Printer Friendly Version

Product Homepage
Download (19 downloads)

1. IntroductionEnough debate has been devoted from time to time to the luck of "go to" in Matlab.Ourselves being somewhat devoted followers of structured programming, we rarely useit in our FORTRAN applications and implementations. However, one cannot help thatsometimes there exists this need of a "quick and dirty" redirection within a code.Nevertheless, we are fully aware that a "go to" implementation in Matlab would leadto a lot of unacceptable coding. The "for entertaining purposes" "go to" implementationof Husam Aldahiyat as presented in File Exchange of Mathworks triggered us into tryingit in a long waiting FORTRAN to Matlab conversion of a subroutine, that needs to performa set of conditional "go tos". This "go to" did not actually work for us. Its mainproblem is that it is designed to handle "go to"s that do not transfer control to other.m code for the same application. Consequently, we decided that it was high time to tryand implement our FORTRAN subroutine with conditional "go tos" in Matlab, using structuredprogramming.2. Our conditional "go to" problemWe need to guide our code, so that to proceed to a series of different steps, dependingon choices. As it happens our choices are quite many. In order to differentiate thesechoices from each other we gave each one a unique number between 0 and 63. It is obviousthat each choice number can be a result of summing up 0, 1, 2, 4, 8, 16 and 32 orequivalently 0, 2^0, 2^1, 2^2, 2^3, 2^4, and 2^5. In our code if sum = 0 nothing happens,if sum = 1 then task#1 is performed, if sum = 2 then task#2 is performed, if sum = 4 thentask#4 is perforned, if sum = 8 then task#8 is performed, if sum = 16 then task#16 isperformed and finally if sum = 32 no specific task is assigned and this choice numberis reserved for provisional use. In other words our code would not exploit all sum valuesavailable. The actual implementation is useful for the calculation of chosen thermophysicalproperties out of a set of available equations for water. To our best knowledge theoriginal of this implementation is to be found in:Hendricks R.C., Peller R.C., Baron A.K., "WASP - A Flexible FORTRAN IV Computer Code ofCalculating Water and Steam Properties", Report No. NASA Technical Note TN D-7391, NASA,Washington D.C. 20546, USA, 1973.3. The FORTRAN implementationIt can be found in the .zip file as total.f subroutine4. The Matlab implementationIt can be found in the .zip file as total.m function5. Some discussionIt was not that straightforward but it is evident that a FORTRAN code with such acomplicated set of conditional "go tos" invoking some programming decisions, could beimplemented in Matlab as well. In this particular case the JPCi variables which governthe conditional choice decisions are included in the m code function, while they arecommunicated to the FORTRAN subroutine, using COMMON blocks calling a BLOCK DATA subprogram.Furthermore, attention should be paid that the implementation presented is based in a systemof "functions that call other functions". Such a programming environment in Matlab calls forusing only static variables that should be communicated "to and from" as inputs and outputsof functions and not as parts of global scripts.S.T. Pachitsas, Student of Mechanical EngineeringN.P. Petropoulos, LecturerNuclear Engineering DepartmentSchool of Mechanical EngineeringNational Technical University of Athens15780 Athens, GREECE

Requirements: No special requirements
Platforms: Matlab
Keyword: Baron Calculating Computer D7391 Flexible Properties Report Steam Technical Water
Users rating: 0/10

License: Shareware Size: 10 KB
Utilities  -  nH2O 1.4.1
nH2O is a "water property" calculator that calculates various thermodynamic properties of steam and water. nH2O is based upon the Modular Modeling System (MMS) steam property library which is composed of a set of routines, some polynomials...
307.2 KB  
Libraries  -  MMDS::Properties 1.902
MMDS::Properties Perl module contains flexible properties handling for MMDS. use MMDS::Properties; my $cfg = new MMDS::Properties; # Preset a property. $cfg->set_property("config.version", "1.23"); # Parse a properties file....
409.6 KB  
Screen Saver Tools  -  Eye Care Software 8.06
Nearly 85 million Americans spend many hours a day working in front of a computer. Over 50 percent report some form of eye strain, including eye fatigue, dry eyes, burning eyes, light sensitivity, blurred vision, and headaches as well as pain in...
1.25 MB  
Benchmark Tools  -  swet: sustained workload efficiency test rc
swet (sustained workload & efficiency test) is a portable benchmark for POSIX and BSD operating systems with multi-thread and multi-process capabilities and flexible, powerful report options.
70.97 KB  
Health & Fitness  -  Cycle Log
Cycle Log adds to the data you can collect on your cycle computer and lets you report that data to The app displays real-time speed, distance and vertical gain data as you ride. Following your ride, Cycle Log provides a graph...
1024 KB  
Education  -  Steam Table Calculator for Pocket PC 1.0
Steam Table MX is an application that calculates temperature, pressure, specific volume, and enthalpy for saturated steam and water. This innovative program provides a fast and easy-to-use reference tool. This is an essential tool for students,...
536 KB  
Reference  -  Psyc-It 1.1
Psyc-It is a robust tool that allows the user to study the properties of air and water vapor mixtures; temperature, relative humidity and dew point are some of the common psychrometric properties. Psyc-It allows the user to determine common...
1.4 MB  
Reference  -  Psyc-it lite 1.1
Psyc-it lite gives the user direct access to the psychrometric properties of air and water vapor mixtures. Temperature, relative humidity, and dew point are some common psychrometric properties. Requirements: iOS 3.0 or later. Compatible with...
614.4 KB  
Development Tools  -  X Steam, Thermodynamic properties of water and steam 1.0, Steam and water properties for Matlab based on the "International Association for Properties of Water and Steam Industrial Formulation 1997 (IAPWS IF-97). A full implementation of the IF-97 standard that provides very accurate steam...
194.56 KB  
Delphi Utilities  -  Advanced Excel Report 1.7
Advanced Excel Report for Delphi is a powerful band-oriented generator of template-based reports in MS Excel. Easy-to-use component property editors allow you to quickly create powerful reports in MS Excel. Now you can create reports, which can be...
6.77 MB  
Scripts  -  Freelancer Script 5.05
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Post projects. Featured projects. Private projects. Sealed projects. Edit/delete projects. Select freelancers....
5.49 MB  
Scripts  -  B2B Script 4.20
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Sign-up Account (Registration of account). Lead generation tools (for the sellers). Email verification to...
5.49 MB  
Scripts  -  B2C Script 5.06
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). The script comes with totally editable site colors, icons and graphics Multilevel categories allows extensive browsing Admin can change Category ordering or...
5.49 MB  
Scripts  -  Social Networking Script 2.86
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Registration with name, email, password, date of birth etc. User can add multiple school, college, university with start...
5.49 MB  
Scripts  -  Business Networking Script 8.04
Main Features: 100% Secured. Email Support (3 Years). FREE Updates (3 Years). Ajax based interface. Profile creation. Different types of profile. Profile for jobseekers, employers and employed...
5.49 MB  
Development Tools  -  VMP Viewer 1.0
This is a very rudimentary tool to visualize the VMP files generated by BrainVoyager. Useful to share files with people who do not have BV.
10 KB  
Development Tools  -  Sending reports and timestamped file by emailing 1.0
main executing reference usage:[1] usage_send_mail.mIllustrates email sending with multiple separate files or single timestamped tar file. Attachment failure is properly handled, with continuation of report emailing without the attachment.[2]...
768 KB  
Development Tools  -  IrisMVC 2.0 rc1
IrisMVC is an OOP PHP framework that developers can use as a strong and secure foundation to build on various web applications following the Model-View-Controller (MVC) pattern. It provides the basic functionality developers need, without...
51.2 KB  
Development Tools  -  7-Zip for Script 4.42
7-Zip is a file archiver with a high compression ratio.Features:- High compression ratio in new 7z format with LZMA compression- Supported formats:- Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR- Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM,...
624.64 KB  
Development Tools  -  Barnardextest 1.0
This file, as the Fisher's exact test, performs the exact probability test for a table of frequency data cross-classified according to two categorical variables, each of which has two levels or subcategories (2x2). It is a non-parametric...
10 KB