Dr Leonid Burstein is a staff member of Kinneret Academic College (Quality Assurance Department), before that he taught at the Technion -IIT, at ORT Braude College, and at several other academic institution in Western and Lower Galilee, in Israel. His scientific work has been reported in more than 50 publications in leading scientific journals. He is author and contributor of published textbooks, monographs, and an Editorial Board member and reviewer for several international scientific journals.
MATLAB(R) in Quality Assurance Sciences fills a gap in the highly topical field of quality assurance (QA). It is a compact guide for students, engineers, and scientists in this field. It concentrates on MATLAB(R) fundamentals with examples of application to a wide range of current problems from general, nano and bio-technology, and statistical control, to medicine and industrial management. Examples cover both the school and advanced level; comprising calculations of total quality management, six sigma, time series, process improvement, metrology, quality control, human factors in quality assurance, measurement and testing techniques, quality project and function management, and customer satisfaction. This book covers key topics, including: the basics of software with examples; graphics and representations; numerical computation, scripts and functions for QA calculations; ODE and PDEPE solvers applied to QA problems; curve fitting and time series tool interfaces in calculations of quality; and statistics calculations applied to quality testing. - Includes MATLAB fundamentals, matrices, arrays, general graphics and specialized plots in quality assurance problems, script files, ordinary and partial differential equations- Gives calculation of six sigma, total quality management, time series forecasting, reliability, process improvement, metrology, quality control and assurance, measurement and testing techniques- Provides tools for graphical presentation, basic and special statistics and testing, ordinary and partial differential solvers, and fitting tools
MATLAB® graphics
Abstract
Graphic presentations of observed data, test results, and various calculations are widely used in the sciences and technology in general and in quality-assurance sciences in particular. MATLAB® has a large assortment of commands for these objectives. These commands allow the generation of two- (sometimes called XY or 2D) and three-dimensional (XYZ or 3D) plots.
Two-dimensional graphics make it possible to draw linear, semi- or logarithmic plots, bars or histograms, pies, Pareto charts, scatter plots, and many other visuals. Several curves can be plotted on a plot and several plots can be presented in the separate Figure Window. A generated plot can be formatted to create the desired style of line or marker form, its thickness or color. In addition, a new line, grid, text, caption or legend can be added to the plot.
To present data involving more than two variables, plots having three axes are used. MATLAB® provides a variety of means for visualizing three-dimensional data that allow the construction of spatial lines, mesh- and surface plots, various geometrical figures and images. Generated plots can be formatted using commands or interactively from the Figure Window.
The most important commands for two- and three-dimensional plots will be presented below. The descriptions that follow are based on the assumption that the reader has thoroughly studied the preceding chapter and therefore, in most cases, explanations to commands are written as inline MATLAB® comments - next to the percentages (%) and not in special frames, as in Chapter 2.
Key words
plots
specifiers
properties
formatting
rotationing
Pareto
3.1 Generation of XY plots
The plot command is the basic command used for XY plotting. In its simplest form it can be written as:
plot(y) or plot(x,y)
where x and y are two vectors of equal length, the first used for the horizontal axis and the second, for the vertical axis.
In the first form of the plot command, the y values are plotted versus their indices. After inputting the plot command with the given values of x and y, the curve y(x) is created in the MATLAB® Figure Window with a linear scale by default. For example, to assure the quality of an antibiotic, a pharmaceutical company checks the acidity level (pH) of the bacterial broth. The pH level is tested for a time span of five hours, every half hour; the results are: 8.32, 8.44, 8.46, 8.49, 8.76, 8.79, 8.40, 8.41, 8.60, 8.65, 8.86. To generate a plot using these data with the x-axis as time and the y-axis as pH the following commands should be typed in the Command Window:
>> t = 0:.5:5;
>> pH = [8.32 8.44 8.46 8.49 8.76 8.79 8.40 8.41 8.60 8.65 8.86];
>> plot(t, pH)
After entering these commands, the Figure Window opens, showing the pH-time plot as shown in Figure 3.1.
If we want to change the line style and/or marker type, the thickness or color, the plot command is used with the addition of optional arguments written just after the x and y identifiers:
plot(x,y, 'Line Specifiers', 'Property Name', 'Property Value')
where the Line Specifiers determine the line type, the marker symbol and the color of the plotted lines (see Table 3.1; the Property Name assigns properties to be specified by the Property Value). Some of the possible properties and required values are shown in Table 3.2.
Table 3.1
Specifiers for the 'Line Specifiers' character string*
Solid(default) | - | Blue (default for single line) | b | Circle | o |
Dotted | : | Green | g | Asterisk | * |
Dash-dot | -. | Red | r | Point | . |
Dashed | - - | Black | k | Square | s |
(none) | no line | Yellow | y | Diamond | d |
Cyan | c | Plus | + |
Magenta | m | Triangle (inverted) | v |
White | w | Triangle (upright) | ^ |
Five-pointed asterisk | p or pentagram |
Six-pointed asterisk | h or hexagram |
* Incomplete
Table 3.2
Available property names, values, and purposes*
Property name (Spelling) | What specifies | Property value |
LineWidth or linewidth | The width of the line | A number in points (1 point = 1/72 inch). The default line width is a half point |
MarkerSize or markersize | The size of the marker (by the symbol) | A number in points. The default value is 6. For the '.' marker: 1/3 of the specified size |
MarkerEdgeColor or markeredgecolor | The color of the marker or the edge color for filled markers | A character based on the color specifiers in Table 3.1 |
MarkerFaceColor or markerfacecolor | The fill color for markers that have a closed area (e.g., a circle or square) | A character based on the color specifiers in Table 3.1 |
* Incomplete
Property names and property values, as well as line specifiers, are typed in the plot commands as character strings inside inverted commas. The specifiers and property names with their values can be written in any order, and one or more of them can be omitted altogether. In this case, the default properties are used.
Below are examples of the plot command with specifiers and properties:
Entering the last command with previously used bacterial broth data, we can obtain the plot shown in Figure 3.2.
In the examples above, the plots are presented by the x,y-points, obtained in measurements. In this case, we say that the data is given as a table. In many cases, the function can be given as a y(x) expression, in which case the vector of y-values should be calculated at the given vector of x-values (see example in Subsection 3.1.2.3. below).
Note:
■ Type and enter the close command in the Command Window to close one Figure Window; to close more than one Figure Window use the close all command.
■ Each time the plot command is inputted, the previous plot is deleted.
3.1.1 More than one curve on the single 2D plot
At least two options can be used in MATLAB® to create a graph of two or more curves in the same plot: in the first option, by typing the pairs of x,y-vectors into the plot command and in the second, by using the hold on … hold off commands.
The plot command option
The commands for creating two or more curves in a single plot have forms:
plot(x1,y1,x2,y2) or plot(x1,y1,x2,y2,…,xn,yn)
where x1 and y1, x2 and y2, xn and yn are pairs of equal-length vectors containing the x,y-data. These commands create graphs with two or n curves respectively. For example, plot in one plot the test results of the ash percentages of two different series of five coal lots each, unloaded from a ship, and tested. The results are 10.00, 9.20 6.80 8.45, 10.12 and 9.24, 9.18, 7.20, 8.51, 10.20%. To generate the graph, enter the following commands (without comments) in the Command Window:
>> x = [1:5]; | %creates vector x |
>> y1 = [10 9.2 8.8 8.45 10.12]; | %creates vector y1 |
>> y2 = [9.24 9.18 8.2 8.51 10.2]; | %creates vector y2 |
>> plot(x,y1,x,y2,'--k') | %generates two lines: solid and dashed, the latter - in black. |
The resulting plot with two curves is shown in Figure 3.3.
To generate more than two curves in the same plot, two new x,y-vectors should be added in the plot command for each additional curve.
The hold command option
Another option for generating plots with more than one curve is to add a new curve to an existing plot; for this, type the hold on command and the new curve...
Erscheint lt. Verlag | 12.2.2015 |
---|---|
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge |
Mathematik / Informatik ► Mathematik ► Computerprogramme / Computeralgebra | |
Technik ► Maschinenbau | |
Wirtschaft ► Betriebswirtschaft / Management ► Logistik / Produktion | |
ISBN-10 | 0-85709-488-2 / 0857094882 |
ISBN-13 | 978-0-85709-488-9 / 9780857094889 |
Haben Sie eine Frage zum Produkt? |
Größe: 16,1 MB
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
Größe: 12,9 MB
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belletristik und Sachbüchern. Der Fließtext wird dynamisch an die Display- und Schriftgröße angepasst. Auch für mobile Lesegeräte ist EPUB daher gut geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich