Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Gemi Rachel G.
Tutor for 5 years.
Tutor Satisfaction Guarantee
MATLAB
TutorMe
Question:

Write the MATLAB code to implement BASK modulation.

Gemi Rachel G.
Answer:

function y = RandSeqUniform(N) y=randi(2,1,N)-1; end function y=BASK(x,A,Tb) N=size(x,2); h=rectangular1(A,Tb,1,[0.01:0.01:N]); m=zeros(1,1800); for(k=1:N); m((k-1)*200+1)=x(k); end y=conv(m,h); end clear f=5; x=RandSeqUniform(10); y=BASK(x,1,2); t=linspace(0,2*pi,2800); c=sin(2*pi*f.*t); s=y.*c; subplot(2,1,1) plot(y); axis([0 2800 0 2]); xlabel('n'),ylabel('y'),title('BASK baseband signal '); subplot(2,1,2); plot(s); axis([0 2800 -1.2 1.2]); xlabel('n'),ylabel('y'),title('BASK modulated waveform ')

C++ Programming
TutorMe
Question:

Write a C++ code for a Breadth First Search in a Graph

Gemi Rachel G.
Answer:

void BFS() { int s; cout<<"\nEnter the source vertex: "; cin>>s; int* visited=new int[n]; for (int i=0;i<n;i++) visited[i]=0; BFSutil(s,visited); } void BFSutil(int v,int *visited) { int front=0,rear=0; int* q=new int[n]; visited[v]=1; q[rear]=v; rear++; while (rear != front) { int u=q[front]; cout<<" "<<u; front++; for (int i=0;i<n;i++) { if (!visited[i] && adjmatrix[u][i]) { q[rear]=i; rear++; visited[i]=1; } } } }

Arduino Programming
TutorMe
Question:

Write an Arduino code to control a servo motor for the purpose of solar tracking. The light information is available through two light dependent resistors placed on the panel.

Gemi Rachel G.
Answer:

#include <Servo.h> Servo servosweep; float pos = 0.0; int V1p = A0; int V1n=A1; int V2p= A2; int V2n=A3; int V1val=0; int V2val=0; int flag=0; int motorp=0; int dv=0; void setup() { motorp=90; servosweep.attach(9); servosweep.write(motorp); Serial.begin(9600); Serial.flush(); delay(200); } void loop() { V1val=analogRead(V1p) - analogRead(V1n); V2val=analogRead(V2p)- analogRead(V2n); dv=V1val-V2val; Serial.print("dV "); Serial.println(dv); if (dv<13 && dv>-3 && V1val<10 && flag==0) nightmode(); else if (dv<70 && dv>-70) { Serial.println("right position"); delay(1000); } else motoring(); } void nightmode() { Serial.println("nightmode"); flag=1; motorp=0; servosweep.write(0); } void motoring() { flag=0; if (dv>0) { motorp=motorp+5; Serial.println("Turn to West"); } else { motorp=motorp-5; Serial.println("Turn to East"); } servosweep.write(motorp); Serial.print("motor "); Serial.println(motorp); delay(2000); }

Send a message explaining your
needs and Gemi Rachel will reply soon.
Contact Gemi Rachel
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.