|
|
|
| R2012a Documentation → Model-Based Calibration Toolbox | |
Learn more about Model-Based Calibration Toolbox |
|
| Contents | Index |
D = CommitEdit(D)
This is a method of mbcmodel.data.
Use this to apply changes you have made to the data, such as creating new variables and applying filters to remove unwanted records.
There are no input arguments. Once you have finished editing your data object D you must commit your changes back to the project. Data can only be committed if both IsEditable and IsBeingEdited are true. CommitEdit will throw an error if these conditions are not met.
D = P.Data;
BeginEdit(D);
AddVariable(D, 'TQ = tq', 'lbft');
AddFilter(D, 'TQ < 200');
DefineTestGroups(D, {'RPM' 'AFR'}, [50 10], 'MyLogNo');
CommitEdit(D);For an example situation which results in CommitEdit failing:
D = p.Data; D1 = p.Data; BeginEdit(D1); tp = p.'Testplan; Attach(tp, D);
Where p is an mbcmodel.project object, and D and D1 are mbcmodel.data objects.
At this point IsEditable(D1) becomes false because it is now Attached to the test plan and hence can only be modified from the test plan. If you now enter:
OK = D1.IsEditable
the answer is false.
If you now enter:
CommitEdit(D1);
An error is thrown because the data is no longer editable. The error message informs you that the data may have been attached to a test plan and can only be edited from there.
BeginEdit | IsBeingEdited | IsEditable | RollbackEdit

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |