matlab Define a vector x from 1 to 100 with increment of 1 Define another vector
ID: 2291474 • Letter: M
Question
matlab Define a vector x from 1 to 100 with increment of 1 Define another vector y containing the square roots of x. Define another vector z defined as z = log,o(x). Combine the three vectors in one matrix D with dimension: 100x3 Find the all values in the matrix D that respect the following condition: The numbers in the y column should be between 30 and 70 and the numbers in the?column should be between 1.6 and 1. Use the fprintf function to display the results and their index values (row, column) and the number of their occurences as shown below X Row index Column index Value 2 5 the total (occurences): 7Explanation / Answer
Matlab:
clear all;
close all;
clc
x=1:1:100;
y=sqrt(x);
z=log(x)
D=[x;y;z].'
the number in y column can not be between 30 and 70 and similarly the number in z column.
Try the code and check the Values in D . You can understand
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.