Contenu principal

import

R2026b

Import K and C test data from file

Since R2026b

Description

import(knc,filePath) imports K and C test data from the file or files specified by filePath. The method detects the file format and uses the appropriate importer.

example

import(knc,filePath,Name=Value) imports K and C test data with additional options specified by one or more name-value arguments. Use name-value arguments to specify test type, test conditions, or file layout parameters for custom file formats.

example

Input Arguments

expand all

K and C service object, specified as a vdynsuspension.KnCService handle-class object created using kncSuspension.

Path to K and C data file or folder, specified as a string scalar, character vector, or cell array of file paths. When specifying a folder path, use the FileType name-value argument to indicate which file type to import.

Data Types: string | char | cell

Name-Value Arguments

expand 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: kncSuspension.import("bounceData.mat", TestType="bounce", ... FrontAntiRollBar=true, RearAntiRollBar=true, EngineState=True, BrakeStatus=False) imports bounce test data from an Anthony Best Dynamics bounce test where the front and rear anti roll bars are connected, the engine is on and the brakes are not applied.

File Import Options

expand all

File type filter for folder import, specified as ".mat", ".tab", ".txt", or ".res". This argument is required when filePath specifies a folder.

Metadata

expand all

Test description, specified as a string scalar.

Data Types: string

Test timestamp, specified as a string scalar in yyyy-mm-dd format.

Data Types: string

K and C test type, specified as one of these values: "bounce", "roll", "steering", "lateral compliance opposed", "lateral compliance parallel", "longitudinal compliance", or "aligning torque opposed".

Test axle specification, specified as "front axle", "rear axle", or "front and rear axle".

Test track specification, specified as "left track", "right track", or "left and right track".

Test Conditions

expand all

Front anti-roll bar connected status, specified as true or false.

Rear anti-roll bar connected status, specified as true or false.

Engine off status, specified as true (engine off) or false (engine on).

Brake applied status, specified as true (brake applied) or false (brake not applied).

Roll axle fixation status, specified as true (fixed) or false (independent).

File Layout

expand all

Header start row number for .tab or .txt files, specified as a positive integer.

Data Types: int32

Header start row number for .tab or .txt files, specified as a positive integer.

Data Types: int32

Header start row number for .tab or .txt files, specified as a positive integer.

Data Types: int32

Header start row number for .tab or .txt files, specified as a positive integer.

Data Types: int32

Header start row number for .tab or .txt files, specified as a positive integer.

Data Types: int32

Header start row number for .tab or .txt files, specified as a positive integer.

Data Types: int32

Header start row number for .tab or .txt files, specified as a positive integer.

Data Types: int32

Field delimiter for .tab or .txt files, specified as a character. The default is tab ('\t').

Data Types: char

Examples

expand all

Create a K and C service and import a .mat data file.

knc = kncSuspension;
knc.import("bounceData.mat")

Import a data file and specify the test type and anti-roll bar conditions.

knc = kncSuspension;
knc.import("bounceData.mat", TestType="bounce", ...
    FrontAntiRollBar=true, RearAntiRollBar=true)

Import all .mat files from a specified folder.

knc = kncSuspension;
knc.import("C:\KnCData\", FileType=".mat")

Version History

Introduced in R2026b