MATLAB Programming Fundamentals - MathWorks
HDL code generation (requires an HDL Coder™ license) Executable files or shared libraries generation (requires a MATLAB Compile ...
System Object Functions After you create a System object, you use various object functions to process data or obtain information ...
Function Description getDiscreteState Returns a structure of the object discrete states. If the object has no discrete states, g ...
System Objects vs MATLAB Functions In this section... “System Objects vs. MATLAB Functions” on page 34-6 “Process Audio Data Usi ...
Define the filter to use. b = fir1(160,.15); Initialize the filter states. z = zeros(1,numel(b)-1); Define the amount of audio d ...
Define the System object to filter the data. filtLP = dsp.FIRFilter('Numerator',fir1(160,.15)); Define the System object to play ...
System Design in MATLAB Using System Objects In this section... “System Design and Simulation in MATLAB” on page 34-9 “Create In ...
(^4) “Run Your System” on page 34-12 — Run your program. You can change tunable properties while your system is running. See “Ru ...
Display Component Property Values To display the current property values for an object, type that object’s handle name at the co ...
Create the audio player object and set the sample rate to the same rate as the input data. audioOut = audioDeviceWriter('SampleR ...
What You Cannot Change While Your System Is Running The first call to a System object initializes and runs the object. When a Sy ...
reset(audioIn);% Reset audio file Wn = [0.05,0.1,0.15,0.2]; for x=1:4000 Wn_X = ceil(x/1000); filtLP.Numerator = fir1(160,Wn(Wn_ ...
Define Basic System Objects This example shows how to create a basic System object that increments a number by one. The class de ...
All methods, except static methods, require the System object handle as the first input argument. The default value, inserted by ...
See Also getNumInputsImpl | getNumOutputsImpl | matlab.System | stepImpl Related Examples “Change the Number of Inputs” on page ...
Change the Number of Inputs This example shows how to set the number of inputs for a System object™ with and without using getNu ...
end end end Run this System object with one, two, and three inputs. addObj = AddTogether; addObj(2) ans = 2 addObj(2,3) ans = 5 ...
% Add inputs together. The number of inputs is controlled by the % nontunable property |NumInputs|. properties (Nontunable) NumI ...
release(addObj); addObj.NumInputs = 2; addObj(2,3) ans = 5 release(addObj); addObj.NumInputs = 3; addObj(2,3,4) ans = 9 See Also ...
Validate Property and Input Values This example shows how to verify that the user’s inputs and property values are valid. Valida ...
«
70
71
72
73
74
75
76
77
78
79
»
Free download pdf