Concept explainers
(a)
Using the MATLAB Help menu discuss how the function ABS(X) used.
(a)
Explanation of Solution
In MATLAB, go to Help, it shows the documentation, examples, wed support, and academy symbols. Open the documentation then search for the specific functions, it will provides the syntax function then click on it, will shows the information about each of the function.
Search for the function ABS(X), the function ABS(X) is used to display the absolute value of the real values and complex values.
Example 1:
In the MATLAB command window type the code as follows,
X=-5;
abs(X)
The output will be displayed as follows,
ans =
5
Example 2:
In the MATLAB command window type the code as follows,
X=-5+6*i;
abs(X)
The output will be displayed as follows,
ans =
7.8102
Conclusion:
Thus, the function ABS(X) has been explained.
(b)
Using the MATLAB Help menu discuss how the function TIC, TOC used.
(b)
Explanation of Solution
Now Search for the command, it is TIC is used to start a stopwatch timer and the command TOC is used to print the number of seconds required for the operation. Both are used to find the program elapsed time.
Example:
In the MATLAB command window write the code as follows,
tic
P = rand(1000,300);
Q = rand(1000,300);
toc
C = P'.*Q';
toc
Its output displays as below, but it is changes every time as the execution time elapsed different time length for each execution,
Elapsed time is 0.049194 seconds.
Elapsed time is 0.067125 seconds.
Conclusion:
Thus, the function TIC, TOC has been explained.
(c)
Using the MATLAB Help menu discuss how the function SIZE(x) used.
(c)
Explanation of Solution
Now search for the SIZE (x), it is the two
Example:
Consider the matrix as follows:
In the MATLAB command window write the code as follows,
x=[1 2 3;4 5 6;7 8 9];
D=size(x)
The output will be displayed as follows,
D =
3 3
Conclusion:
Thus, the function SIZE(x) has been explained.
(d)
Using the MATLAB Help menu discuss how the function FIX(x) used.
(d)
Explanation of Solution
Now search for the command FIX(x) in Help tab, it is used to round the element of x to the nearest integer towards zero.
Example:
In the MATLAB command window write the code as follows,
x=3.48;
fix(x)
The output will be displayed as follows:
ans =
3
Conclusion:
Thus, the function FIX(x) has been explained.
(e)
Using the MATLAB Help menu discuss how the function FLOOR(x) used.
(e)
Explanation of Solution
The command FLOOR(x) is used to round the element of x to the nearest integer towards negative infinity.
Example:
In the MATLAB command window write the code as follows,
x=-3.67;
floor(x)
The output will be displayed as follows,
ans =
-4
Conclusion:
Thus, the function FLOOR(x) has been explained.
(f)
Using the MATLAB Help menu discuss how the function CEIL(x) used.
(f)
Explanation of Solution
In MATLAB Help tab search the function, the command CEIL(x) is used to round the element of x to the nearest integer towards infinity.
Example:
In the MATLAB command window write the code as follows,
x=3.67;
ceil(x)
The output will be displayed as follows,
ans =
4
Conclusion:
Thus, the function CEIL(x) has been explained.
(g)
Using the MATLAB Help menu discuss how the function CALENDAR used.
(g)
Explanation of Solution
The CALENDAR function is a
Example 1:
In the MATLAB command window write the code as follows,
calendar (1989,10)
The output will be displayed as follows,
Oct 1989
S M Tu W Th F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 0 0 0 0
0 0 0 0 0 0 0
Example 2:
In the MATLAB command window write the code as follows,
calendar (8,10)
The output will be displayed as follows,
Oct 0008
S M Tu W Th F S
0 0 0 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 0
0 0 0 0 0 0 0
Conclusion:
Thus, the function CALENDAR has been explained.
Want to see more full solutions like this?
Chapter 15 Solutions
Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)
- Present Example 9.4 in Chapter 9 using the format discussed in Section 4.2. Divide the example problem into Given, Find, and Solution sections.arrow_forwardProgramming the MCS Method in MATLAB or any programming language which you are familiar according to the procedure proposed by this course.arrow_forwardCOMPLETE SOLUTION WITH FIGURES. BOX YOUR FINAL ANSWERUSE 3 DECIMAL PLACES IN EVERY SOLVED VALUESarrow_forward
- Please answer correctly, PLEASE! Thank you I will ?arrow_forward1/ You're required to create an AutoCAD lisp. create a lisp by prompting the idea to Al then copying the code to the text editor and saving it as Isp. You should submit the lisp file in addition to another txt file containing the exact prompt that you wrote for Al. Make sure it works well before you send it.arrow_forwardQ# Define mass diagram. Explain the use of mass diagram.arrow_forward
- i) A model is a representation of either reality or vision. Just as “a picture is worth a thousand words”, most models use picture to represent the reality or vision. However, in an instance an engineer chooses a model with equations and an algebraic figure to represent an idea, the model becomes which kind of model? ii) Mention four methods used to determine preferred plans to use for complex and large scale systems.arrow_forward2. Geographical position of an object, their attributes, their spatial relationship, and time factor are managed by a complex system called . a. GIS b. vector c. geographical position d. Rasterarrow_forwardAs described in the Data and Results part of , all tables and graphs must have descriptive information such as titles, column or row headings, units, and axis labels, and data points must be clearly marked. All figures must be numbered and have a descriptive title. The figure number and the title should be placed below the figure. All tables must be numbered and have a descriptive title as well. However, for tables, the table number and the title should be placed above the table. The relationship between a spring force and its deflection is given in the table at the top of the next column. Plot the results using engineering paper and incorporating the ideas discussed in this chapter.arrow_forward
- Engineering Fundamentals: An Introduction to Engi...Civil EngineeringISBN:9781305084766Author:Saeed MoaveniPublisher:Cengage LearningResidential Construction Academy: House Wiring (M...Civil EngineeringISBN:9781285852225Author:Gregory W FletcherPublisher:Cengage Learning