Enable contrast version

Tutor profile: Motaz E.

Online
Motaz E.
Teaching Assistant
Tutor Satisfaction Guarantee

Questions

Subject: Numerical Analysis

TutorMe
Question:

Write a Matlab program to perform the bisection method, the program must terminate when the error reaches a certain value.

Inactive
Motaz E.
Answer:

function [c,err,yc] = bisect(f,a,b,delta) ya = feval(f,a); yb = feval(f,b); if ya*yb > 0 disp('f(a)*f(b) > 0'), yc = NaN; c = NaN; err = NaN; return, end N = 1+round((log(b-a)-log(delta))/log(2)); for k = 1:N+1 c =(a+b)/2; yc = feval(f,c); if yc == 0 a = c; b = c; elseif yb*yc>0 b = c; yb = yc; else a = c; ya = yc; end; end err = abs(b-a);

Subject: Electrical Engineering

TutorMe
Question:

Under equilibrium condition, what is the probability of an electron state being occupied if it is located at the Fermi level?

Inactive
Motaz E.
Answer:

1/2

Subject: C++ Programming

TutorMe
Question:

Write a C++ program that takes a matrix called X [2,3]= {{1,-2,1},{4,7,3}}, finds its transpose and the product of the matrix with its transpose.

Inactive
Motaz E.
Answer:

#include <iostream> using namespace std; int main() { int x[2][3]={{1,-2,1},{4,7,3}}; int y[3][2]; for(int i=0;i<2;i++) { for(int j=0;j<3;j++) { y[j][i]=x[i][j]; } } for(int i=0;i<3;i++) { for(int j=0;j<2;j++) { cout<<y[i][j]<<'\t'; } cout<<endl; } cout<<"\nz equals: \n"; int z [3][3]={0}; for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { for (int k=0;k<2;k++) { z[i][j]+=y[i][k]*x[k][j]; } } } for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { cout<<z[j][i]<<'\t'; } cout<<endl; } return 0; }

Contact tutor

Send a message explaining your
needs and Motaz will reply soon.
Contact Motaz

Request lesson

Ready now? Request a lesson.
Start Lesson

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 Lesson" 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.