Question: I am using the following technique in writing data to AFG3021B Tektronix through Matlab0.2012a. Which is as you can see converting the waveform into a

 I am using the following technique in writing data to AFG3021B

I am using the following technique in writing data to AFG3021B Tektronix through Matlab0.2012a. Which is as you can see converting the waveform into a binary block and sending it to the output channel % Encode variable "waveform" into binary waveform data for AFG. This is the % same as AFG50006 but marker bits are ignored. Refer to AFG50006 series % programmer manual for bit definitions. binblock = zeros(2 = waveformLength, 1); binblock(2:2:end) = bitand(waveform, 255); binblock(1:2:end) = bitshift(waveform, -8); binblock = binblock'; % Build binary block header bytes = num2str(length(binblock)); header = ['#' num2str(length(bytes)) bytes]; % Transfer the custom waveform from MATLAB to edit memory of instrument furite(myFgen, [': TRACE EMEM, ' header binblock ";"], "units"); % Associate the waveform in edit memory to channel 1 fprintf(myFgen, "SOUR1:fUNC EMEM"); -- Since the previous code worked perfectly, i tried it with sending a modulate data (16QAM) to AFG which consists of two componants in phase and quadrature (complex) in other words I an trying to convert a complex array. But the problem is that the functions above "bitant" & "bitshift" does not accept parameters of type complex and they must be real. Is there another way of doing this? I am using the following technique in writing data to AFG3021B Tektronix through Matlab0.2012a. Which is as you can see converting the waveform into a binary block and sending it to the output channel % Encode variable "waveform" into binary waveform data for AFG. This is the % same as AFG50006 but marker bits are ignored. Refer to AFG50006 series % programmer manual for bit definitions. binblock = zeros(2 = waveformLength, 1); binblock(2:2:end) = bitand(waveform, 255); binblock(1:2:end) = bitshift(waveform, -8); binblock = binblock'; % Build binary block header bytes = num2str(length(binblock)); header = ['#' num2str(length(bytes)) bytes]; % Transfer the custom waveform from MATLAB to edit memory of instrument furite(myFgen, [': TRACE EMEM, ' header binblock ";"], "units"); % Associate the waveform in edit memory to channel 1 fprintf(myFgen, "SOUR1:fUNC EMEM"); -- Since the previous code worked perfectly, i tried it with sending a modulate data (16QAM) to AFG which consists of two componants in phase and quadrature (complex) in other words I an trying to convert a complex array. But the problem is that the functions above "bitant" & "bitshift" does not accept parameters of type complex and they must be real. Is there another way of doing this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!