Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROBLEMS: Matlab Environment: Undock and dock command window and take a screenshot for each case. [ Two screenshots ] Procedure: Click on the window. Undock:

PROBLEMS:
Matlab Environment: Undock and dock command window and take a screenshot for each case. [Two screenshots] Procedure:
Click on the window.
Undock: (Ctrl+Shift+U)
Dock: (Ctrl+Shift+D)
Make a helloWorld script
When run, the script should display the following text:
Hello World! I am YOUR_NAME
I am going to learn MATLAB!
Procedure:
Run Matlab, click File New Script (Shortcut: Ctrl+N).
Save the file: "lastname_firstname_lab1_helloworld.m"[Use this syntax for all problems]
Write these lines to the beginning of the script.
% lname_fname_lab1_helloworld.m
2@ Brief: This program displays two strings.
Use disp function.
Copy and paste your code to your lab report.
Scalar Variables: Make the following variables in Command Window. (Take a screenshot after each command and add it to your lab report. Total: 4 screenshots)
a=10
b=2.5**1023
c=2+3i, where i is the imaginary number
Page 2 of 5
Introduction to Matlab Programming - Lab Manual
d=e23, where e is Euler's number.
Hint (1): Carat sign: ab is defined using the carat sign between values a???b.
Hint (2): Get help on the MATLAB function exp using: (a) The "help exp" or (b) "doc exp" command typed in the Command Window.
Hint (3): 'pi' is a keyword in Matlab. pi ==3.1416.
Scalar Equations: Using variables calculated in the previous problem, calculate equations below in Command Window: (Take a screenshot after each command and add it to your lab report. Total: 3 screenshots)
a.x=11+e(-a-156)
b.y=(a2+b21), recall that hg=h1g
Vector Generation: In MATLAB a vector is a matrix with either one row or one column. The distinction between row vectors and column vectors is essential. Many programming errors are caused by using a row vector where a column vector is required, and vice versa.
i:k generates row vector containing integers from i to k with unit spacing ( incremental of 1).
i:j:k generates row vector containing integers from i to k with spacing of j(j can be any number including real numbers)
Procedure:
Create a script "vector_size.m".
Write these lines in your script.
Variables and Vectors
Assigns a single value to a
m=1;
Creates a vector from 0 to 10 with spacing of 1 and then
26 assigns all these values to x
x=0:10
% Creates a vector from 0 to 10 with spacing of 0.5 and then
assigns all these values to x
y=0:0.5:10;
ond of code
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Discuss the IAS 38 requirements for capitalizing development costs.

Answered: 1 week ago