In: Mechanical Engineering
Command | use | |
A | sort(Data1) | It's short the array in ascending order |
B | mink(Data1,5) | It store 5 minimum element of Array |
C | power(Data1,3) | It cube element of Array |
D | plus(Data1,5) | It add 5 to all element of Array |
E | transpose(Data1) | it transpose the array |
Also the matlab code for your reference and its output
CODE:
clc;clear all;
Data1=[3.6 8.9 2.5 4.6 12.0 3.3 7.8 1.5];
%%A Sort low to high
Data1=sort(Data1);
display([Data1]);
%%B 5 Lowest values
Data2=mink(Data1,5);
display(Data2);
%%C cubes of Each element
Data3=power(Data1,3);
display(Data3);
%%D Add 5 to each element
Data4=plus(Data1,5);
display(Data4);
%%E Vetical array
Data5=transpose(Data1);
display(Data5);
-Output:
Data1 =
1.5 2.5 3.3 3.6 4.6 7.8 8.9 12
Data2 =
1.5 2.5 3.3 3.6 4.6
Data3 =
3.375 15.625 35.937 46.656 97.336 474.55 704.97 1728
Data4 =
6.5 7.5 8.3 8.6 9.6 12.8 13.9 17
Data5 =
1.5
2.5
3.3
3.6
4.6
7.8
8.9
12
Hope the answer is helpful for any doubt comment below i will solve your query and rate my answer your rating is important to us.