Answer:
a)
inv([1 1; 100 100])
warning: matrix singular to machine precision
warning: called from ATest at line 1 column1
ans =
Inf Intf
Inf Inf
b)
A = [4, 9; 5, 11]
B = inv(A)
A*B
B*A
4. 9
5 11
-11.0000 9.0000
5.0000 4.0000
ans . 00000 -0.00000
0 . 00000 1.00000
ans 1.00000 0.00000
0.00000 1.00000
c)
x = [5; 10]
y = A*x
x = [5; 10]
y=
110 135"
d)
B * y is
5.0000
10.0000
e)
B * y
ans 5.0000
10.0000
Explanation:
This question can have both answers that is yes as well as no.
1.Yes, it can serve as an editor who completes your content and ensures it will read well to others.
2. No, the editor should have tracked changes which would have shown you where they would apply recommended edits.
Microsoft windows was his first
Answer:
The program in C++ is as follows:
#include <iostream>
#include <vector>
using namespace std;
int main(){
vector<int> nums;
int num;
cin>>num;
while(num != -1){
nums.push_back(num);
cin>>num; }
for (auto i = nums.begin(); i != nums.end(); ++i){
cout << *i <<endl; }
return 0;
}
Explanation:
This declares the vector
vector<int> nums;
This declares an integer variable for each input
int num;
This gets the first input
cin>>num;
This loop is repeated until user enters -1
while(num != -1){
Saves user input into the vector
nums.push_back(num);
Get another input from the user
cin>>num; }
The following iteration print the vector elements
<em> for (auto i = nums.begin(); i != nums.end(); ++i){
</em>
<em> cout << *i <<endl; }
</em>