Function rmfield - structure, MATLAB in Engineering

Function rmfield - structure:

The function rmfield eliminates a field from the structure. It returns a new structure with field eliminated, but does not modify the original structure (except the returned structure is assigned to that variable). For illustration, the below would eliminate the code field from the newpack structure, however store the resulting structure in the default variable ans. The value of the newpack remains unaffected.

>> rmfield(newpack, 'code')

ans =

item_no: 111

cost: 19.9900

price: 34.9500

>> newpack

newpack =

item_no: 111

cost: 19.9000

price: 34.9500

code: 'g'

 

To change the value of newpack, the structure which results from calling rmfield should be assigned to newpack.

>> newpack = rmfield(newpack, 'code')

newpack =

item_no: 111

cost: 19.9000

price: 34.9500

Posted Date: 10/20/2012 5:57:48 AM | Location : United States







Related Discussions:- Function rmfield - structure, Assignment Help, Ask Question on Function rmfield - structure, Get Answer, Expert's Help, Function rmfield - structure Discussions

Write discussion on Function rmfield - structure
Your posts are moderated
Related Questions
deblank function: The deblank function eliminates only trailing blanks from the string, not leading the blanks. The strtrim function will eliminate both the leading and traili

function imread: The function imread can read an image file, for illustration a JPEG (.jpg) file. The function reads color images into a 3-dimensional matrix. >> myimage1

True color matrice: The true color matrices are the other way to represent images. The true color matrices are 3-dimensional matrices. The first two coordinates are the coordi

Function used in sound files: The MATLAB has numerous other functions which let you read and play sound or audio files. In the audio files, sampled data for each audio channel

Executing a program: Running the program would be completed by typing the name of the script; this would call the other functions: >> calcandprintarea Whenever prompt

For Loops which do not use an iterator Variable in the action: In all the illustrations that we seen so far, the value of the loop variable has been used in same way in the ac

Gauss, Gauss-Jordan elimination: For 2 × 2 systems of equations, there are well-defined, easy solution techniques. Though, for the larger systems of equations, finding solutio

Simplification Functions: There are numerous functions which work with expressions, and simplify the terms. Not all the expressions can be simplified, but the simplify functio

Example of file ploting data: As the other example, a data file called 'compsales.dat' stores the sales figures (in millions) for divisions in a company. Each line in the f

I have a frequency response data. How do I convert that to state space? I am given a 6 row and 3 column data (steady state). How do i convert that to state space model?