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

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

Serving Software Downloads in 956 Categories, Downloaded 50.310.414 Times

Structure Fields To Variables 1.0

  Date Added: July 07, 2013  |  Visits: 123

Structure Fields To Variables

Report Broken Link
Printer Friendly Version


Product Homepage
Download (43 downloads)



Structures are a convenient way of carrying around many variables as a single object and of passing those variables to a function packed in a single argument.Once a structure has been passed to a function, however, many users (according to various Newsgroup posts) find it tiresome to have to access its fields repeatedly through dot-indexing notation and have sought automated ways to take a structure and assign all of its fields to separate variables, as ina = myStruct.a;b = myStruct.b;c = myStruct.c;etc...Solutions based on assignin() have often been tried, but are hazardous, for reasons discussed, for example, in this thread:http://www.mathworks.com/matlabcentral/newsreader/view_thread/244639#628695The structvars() tool in this FEX submission does something virtually as good and far safer.Given a structure, it will print a set of assignment commands that, if executed, would assign fields of a structure to individual variables of the same name (or vice versa). The expression produced by structvars() can be conveniently copy/pasted from the command window to the file editor at the location in the file where the variables need to be unpacked. Examples: Given structure myStruct, with fields a,b,c, & d (1) structvars(myStruct) %assign fields to variables ans = a = myStruct.a; b = myStruct.b; c = myStruct.c; d = myStruct.d; (2) structvars(3,myStruct) %split the last result across 3 columns ans = a = myStruct.a; c = myStruct.c; d = myStruct.d; b = myStruct.b; (3) structvars(3,myStruct,0) %assign variables to fields ans = myStruct.a = a; myStruct.c = c; myStruct.d = d; myStruct.b = b; The commands can obviously be regenerated if you add/remove structure fields later on. On the other hand, the effort of just making these incremental edits manually is typically minimal.

Requirements: No special requirements
Platforms: Matlab
Keyword: Command Conveniently Copypasted Editor Expression Location Produced Unpacked Window
Users rating: 0/10

License: Shareware Size: 10 KB
USER REVIEWS
More Reviews or Write Review


STRUCTURE FIELDS TO VARIABLES RELATED
Programming  -  ShellRaptor: Command Line SQL Utility 1.0
Simple java based command line SQL editor. Will connect to any database that you can provide a JDBC Type 4 driver for (in the form of a jar).
25.57 KB  
Windows Software  -  Resource Tuner Console 1.91
Resource Tuner Console is a tool that enables developers to automate batch editing of the resources embedded in 32 and 64-bit Windows executable files. This command-line resource editor allows using VBScript to create a repeatable process for...
2.23 MB  
Audio Tools  -  cutmp3 1.9.2
cutmp3 is a small and fast command line MP3 editor. cutmp3 lets you select sections of an MP3 interactively or via a timetable and save them to separate files without quality loss. It uses mpg123 for playback and works with VBR files and even...
33.79 KB  
Development Editors  -  EasyHTML 2.4
EasyHtml is 100% free HTML-editor, basically the same as Window's memo, except EasyHtml has many useful features. HTML-tags ( ) are color coded; 18 "helpers" to make bug free HTML-code based on your answers; Open as many HTML-documents as...
3.05 MB  
Games  -  SudokuUI 1.0
To run the file type SudokuUI at the command line, this will bring up a figure window with the layout for a standard blank 9x9 sudoku grid on it. Right clicking on any of the blank squares will then provide you with the available numbers that can...
10 KB  
Modules  -  Paint Color Insert Tool 1.1
Insert a button into the editor which opens a popup window letting users insert images and links of paint color matches from over 100 paint brands. Includes all colors/schemes and products from MyPerfectColor.com. Very useful time saving plugin...
40.96 KB  
Audio Tools  -  PGID3 Tag Editor 2.02
PGID3 is an ID3v1 and v2 tag editor for manipulating the information on files such as MP3s. PGID3 Tag Editor project is written in PHP and uses PHP-GTK, so it can take advantage of the GTK+ Toolkit for rendering a GUI. The program itself is...
8.19 KB  
Text Editors  -  Smart Editor Professional 2004 2.0.0.4
Smart Editor Professional is a complete Text, Hex, Programmers, HTML Editor. Features include support for most programming languages, WYSIWYG HTML designer, Template Projects, Project Manager, FTP support, Code Library, Programming Assistants,...
4.17 MB  
Communication  -  Simple Audio Editor 1.0
AudioEditor creates a GUI used for editing audio data. It supports reading from a WAVE audio file, writing to a WAVE audio file, importing from a MATLABdlT« variable, exporting to a MATLAB variable and recording from microphone. There are...
30.72 KB  
MP3 Players  -  Mp3 Music Editor 7.2.3
MP3 Music Editor records anything you hear of different sound sources: microphone, streaming, internet radio, CD/DVD player, external LP, AM/FM/Satellite radio, etc. Lossless recording quality and most detailed setting. You can skip silence and...
15.13 MB  
NEW DOWNLOADS IN SCRIPTS, DEVELOPMENT TOOLS
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  -  Aml2CHM 3.50
Those who use the popular Aml Pages text editor might be looking out for a way of generating help files from their text and notes. Aml2CHM is a plug-in that was developed to offer people a quick and efficient way of converting Aml Pages documents...
549.99 KB  
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