Please answer Part A & B as soon as possible. I would appreciate if you could dr
ID: 3570694 • Letter: P
Question
Please answer Part A & B as soon as possible. I would appreciate if you could draw the graph on the paper. Sorry if the text is not clear. Thanks.
3.) You are working with a group that is testing a new oscilloscope. The software you are working on is using the below struct to store each signal collected by the team members #define MAXPTS 10000 typedef struct ( char * name; //Name of Person Collecting Data int pts; II number of points in the signal int starttime; Collection? starting time expressed as the number of seconds time between subsequent samples //The values of the signal in volts } signal_t; (12 pts) Draw a diagram of a simple real world signal and relate the elements of signal t to it. Write a function that takes a pointer to a signal_t along and outputs the signal in the following format: (Example below pts=3, start time is 123456, dt is 0.5, name is Tom Daniels) Sample output Tom Daniels collected 3 points starting at 123456:Explanation / Answer
typedef struct
{
char* name;
int pts;
int starttime;
double dt;
double s[MAXPTS];
}signal_t;
void func(signal_t* sig){
cout<<sig->name<<" collected "<<sig->pts<<" points starting at "<<sig->starttime<<"s ";
for(int i=0;i<s->pts;i++){
cout<<starttime+i*sig->dt<<" "<<sig->s[i]<<endl;
}
}
the graph of th signal depnds upon the nature of variation in the voltag according to time which can be linear or sinusodial or anything else..
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.