Main Content

plotsnr

Plot signal-to-noise ratio (SNR) for Taguchi design factors

Since R2025a

    Description

    plotsnr(dtag,Y) creates a plot of signal-to-noise ratio (SNR) information for the factors in the Taguchi design of experiments (DOE) object dtag and response data Y. For more information, see taguchiDOE.

    example

    plotsnr(dtag,Y,Name=Value) specifies additional options using one or more name-value arguments. For example, you can specify the formula to compute the SNR.

    plotsnr(parent,___) plots into the figure specified by parent instead of the current figure (gcf) using any of the input argument combinations in the previous syntaxes.

    h = plotsnr(___) returns the handles (h) to the lines in the SNR plot.

    Examples

    collapse all

    Generate a Taguchi L36 design with four factors and custom levels.

    dtag = taguchiDOE([1 2 3],["A" "B"],[10 20],["L" "R"],"L36");

    Generate a response value for each run in the taguchiDOE object dtag.

    Y = rand([36,1]);

    Create a plot of nominal SNR information for the factors and their individual levels.

    plotsnr(dtag,Y)

    Figure contains 4 axes objects. Axes object 1 with xlabel Factor1, ylabel Signal-To-Noise Ratio (nominal) contains an object of type line. Axes object 2 with xlabel Factor2 contains an object of type line. Axes object 3 with xlabel Factor3 contains an object of type line. Axes object 4 with xlabel Factor4 contains an object of type line.

    Input Arguments

    collapse all

    Taguchi design, specified as a taguchiDOE object.

    Response data, specified as a numeric vector with n elements, where n is the number of rows in dtag.Design.

    Data Types: single | d

    Parent container, specified as a Figure or Panel object.

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: plotsnr(dtag,Y,FactorNames=["A","B"]) specifies to plot SNR information for the factors "A" and "B" in the Taguchi design dtag, using the response data Y.

    Factor names, specified as a string vector, character vector, or cell array of character vectors. plotsnr returns SNR information for the factors in FactorNames that are factor names in dtag.Design. You cannot specify factor names that are noise factors in dtag. If you do not specify FactorNames, the function plots the first five factors in dtag.Design.

    Example: FactorNames=["A","B"]

    Data Types: char | string | cell

    SNR formula, specified as a value in this table.

    ValueDescriptionFormula
    "nominal" (default)Match the response value to a specific target value.10*log(mean(Y)^2/std(Y))
    "smallest"Minimize the response value.-10*log(mean(Y.^2))
    "largest"Maximize the response value.-10*log(mean(1./Y.^2))

    Example: RatioMethod="smallest"

    Data Types: char | string

    Output Arguments

    collapse all

    Graphics handles for line objects, returned as a vector of Line graphics handles. The length of h is equal to the number of factors in the plot. Graphics handles are unique identifiers that you can use to query and modify the properties of a specific line on the plot.

    To view and set properties of line objects, use dot notation. For information on using dot notation, see Access Property Values. For information on the Line properties that you can set, see Line Properties.

    References

    [1] Krishnaian, K., and P. Shahabudeen. Applied Design of Experiments and Taguchi Methods. New Delhi: PHI Learning Private Limited, 2012.

    Version History

    Introduced in R2025a

    See Also

    |