Trial Question
You cannot submit for this problem because the homework's deadline is due.
Description
Basic Matlab Knowledge x,y are two column vectors.
Let x =
3
2
6
8
and y =
4
1
3
5
1. Define x and y in MATLAB.
2. Add the sum of the elements in x “at the end of” y.
3. Raise each element of x to the power specified by the corresponding element in y.
4. Divide each element of y by the corresponding element in x.
5. Multiply each element in x by the corresponding element in y, and store the result in a variable z.
6. Add up the elements in z and assign the result to a variable w.
7. Compute x′ ∗ y − w and explain the result
Format
Input
None
Output
For each task, first do the task then display the variables.
Notice that in task 7, you should also display the final result.
1.
disp( x );
disp( y );
2.
disp( x );
disp( y );
3.
disp( x );
disp( y );
4.
disp( y );
disp( x );
5.
disp( x );
disp( y );
disp( z );
6.
disp( z );
disp( w );
7.
disp( x );
disp( y );
disp( w );
disp( x' * y - w );
Trial for JOJ
- Status
- Finished
- Problems
- 1
- Open Since
- 2020-06-03 00:00
- DDL
- 2020-06-11 23:59
- Extension
- 24.0 hour(s)