Answer to Question #247463 in Electrical Engineering for lungelo

Question #247463

. Write a script file that will prompt a student to enter his/her class mark of a subject and then examination mark. Calculate the final mark taking 30% and 70% from the class mark and examination marks respectively and display the information to the student as Final mark = … 


1
Expert's answer
2021-10-10T09:33:28-0400

matlab code:

%%%%%% Q1

cmk=input('enter your class marks: ');

emk=input('enter your e*am marks: ');

fmk=(0.3*cmk)+(0.7*emk);

disp(['Your final marks are: ',num2str(fmk)])


%%%%%% Q2


clear

v=0:100;

c=2;

q=c*v;

plot(v,q)

xlabel('Volatge Volts')

ylabel('Charege Coulumbs')

grid on


%%%%%%%%%%%%%% Q3


john=[10,20,25,20,10,42,55];

james=[25,20,30,35,38,25,35];

days=['Mon','Tue','Wed','Thu','Fri','Sat','Sun']

plot(1:7,john)

hold on

plot(1:7,james)

legend('John','James')

xlabel('Day of week')

ylabel('Distance travelled')

%xticks(days)

%%%%%%%%%%%%%%%%

outputs:


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS