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 vector function which determines the number of rows and columns in the M by N matrix.
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
- 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_forwardThe domain and range of the * :function which has the graph %23 is x 2 1 & y > 1 O is x 2 2 & y > 2 O is x 1 O is x 2 2 & y > 1 O is x 2 2 & y 1 O is x > 1 & y > 1 Oarrow_forwardFind the D10,D30 & D60 from the given graph,where the blue line represents the cumulative distribution while X-axis dimensions are in logarithmic scale.arrow_forward
- Programming 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_forwardSlove the following equation using grammars rule: X + 2y + Z = 3 2X + y - Z = 0 X - y + Z = 0arrow_forward
- COMPLETE SOLUTION WITH FIGURES. BOX YOUR FINAL ANSWERUSE 3 DECIMAL PLACES IN EVERY SOLVED VALUESarrow_forwardPlease 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_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_forwardQ#2 Write a note on the Basic Terminologies used in structure analysisarrow_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