• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

Matlab Latest Exam With Complete Solutions (A+)

Document preview thumbnail
Preview 2 out of 6 pages

MATLAB LATEST EXAM WITH COMPLETE SOLUTIONS (A+)...

Content preview

MATLAB LATEST EXAM WITH COMPLETE
SOLUTIONS (A+)


what at the end of the line suppresses the echo - ANSWER ;



how would you make something print - ANSWER fprintf()



how would you say "Print this string" - ANSWER fprintf('Print this string')



how do you make the >> go on another line - ANSWER




if you wanted to print 'My name is Nadia Parsell' and wanted to make sure the >> was on
another line, how would you do that - ANSWER fprintf('My name is Nadia Parsell

')



where can you have the (

) - ANSWER anywhere



if you wanted to print 'First line' 'Second line' and 'Third line' on different lines how would
you do that - ANSWER fprintf('First line

Second line

Third line

')



how do you clear everything in your workspace - ANSWER clear all

, how do you clear the command window - ANSWER clc



if your script is not terminating, how would you manually stop it - ANSWER command +.



how do you create a multi-line comment - ANSWER %{This is a multi-line comment %}



How would you prompt the user for values or numbers - ANSWER input()



How would you prompt a user to input a number - ANSWER myNum=input('Enter a
number:')



how would you ask a user to input their age - ANSWER yourAge=input('Please enter
your age:')



By default what will the input be considered as - ANSWER A number



What would you have to do in order to force MATLAB to take the input as a string -
ANSWER Add ','s



how would you ask somebody to enter their name ANSWER yourName=input('Please
enter your name:','s')



when printing number. what is the difference between %d or %f ANSWER %f gives you 6
decimal places, %d just gives you the number you placed in



so if we had to code fprintf('%s %s %s

', 'first', 'second', 'third') how would you reorder it so that it goes from third second to
first - ANSWER fprintf('%3$s %2$s %1$s

Document information

Uploaded on
November 11, 2024
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Easton
3.9
(124)
Sold
605
Followers
221
Items
28026
Last sold
2 days ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions