MATLAB QUESTION !!! PLEASE USE MATLAB FOR BOTH QUESTIONS!!! THANKS
B=[0 1 2 3 4;5 0 6 8 9;2 3 0 9 2;6 8 4 0 7];
mean_B=mean(mean(B));
median_B=median(median(B));
B=[flip(sort(B(1,:)));flip(sort(B(2,:)));flip(sort(B(3,:)));flip(sort(B(1,:)))];
fprintf("Mean of matrix B is: %f\n",mean_B);
fprintf("Meadian of matrix B is: %f\n",median_B);
disp("Sorted matrix is:\n");
disp(B);
Please find the attached code..
clc;
clear all;
X = [0:1:50; 50:1:100]; % Here, 1 is interval (You can change it as per your needs)
Y = X.^10;
Z = X.*(Y.^2);
subplot(2,2,1);
mesh(X,Y,Z);
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Mesh plot');
subplot(2,2,2);
surf(X,Y,Z);
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Surface plot');
subplot(2,2,3);
plot3(X,Y,Z);
xlabel('X');
ylabel('Y');
zlabel('Z');
title('3-Dimentional plot');
subplot(2,2,4);
surfc(X,Y,Z);
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Surface-Contour plot');
grid on;
The subplot command will create a figure grid for plots. Eg. subplot(i,j,k), it will create a figure grid with i rows and j columns (i*j number of figures), and 'k' is a figure number.
The output will look like..
MATLAB QUESTION !!! PLEASE USE MATLAB FOR BOTH QUESTIONS!!! THANKS 3) Below is a matrix of...
How do I solve using Matlab? Create a matrix X so that the first row has values from 0 to 50 (default intervals), and the second row has values from 50 to 100. Let matrix Y equal to x10 and Z equal to x + y2 Create 4 subplots containing a mesh, surface, 3-Dimensional, and a surface-contour plot. Label with appropriate titles and labels. The plots should have a string look to them.
How do I solve using Matlab? Below is a matrix of random numbers. Find the mean, median, and mode of the matrix. B=[0 1 2 3 4 50 689 23092 68 40 7] Sort Matrix Z so that the largest numbers of each row are in the first column and smallest numbers descend towards the last column. Must use sort function.
what is a good matlab code to out put this matrix from question 1 to 3 HITA 1)-The general form cf the quadratic equation is a +bx+c 0 Wrte a MATLAB function named quadratic that finds the two roots of this equation and x when given the coeficients a, b and c 2)-Create a random matrix A in MATLAB with 6 rows and 3 oolumns using the rand) function 3)-Now modify quadratic by so that il can take each row...
cope the code please thanks Write a MATLAB code to obtain the following. Keep your code commented whenever required. Copy your source code and command widow outcomes and screen shots of any plots in your solution. Generate a matrix "A" as follow. A= 16 6 8 2 10 18 12 14 4 I. II. Divide the matrix A by 2 and store the result in a matrix B. Combine matrices A & B to obtain the following matrix C. Also...
PLEASE USE MATLAB Create a single MatLab script that On a single line (Line 1), defines matrix A such that A = 1 2 4. 5 7 8 Suppress the echo of A. On a single line (Line 2), use the size function to echo the size of A. On a single line (Line 3), use the length function to echo the length of the entire first row of A. On a single line (Line 4), use linear index notation...
In Matlab A= 3 -5 6 ( 15 7 9 13 5 -4 12 10 2 8 11 4 1 For the matrix A in problem-2, use MATLAB to carry out the following instructions a. Find the maximum and minimum values in each column. b. Find the maximum and minimum values in each row. c. Sort each column in ascending order and store the result in an array P. d. Sort each row in descending order and store the result...
The question is attached in following two photos. Please use Matlab if you exactly know how to do it. Thank you. Linorm.m Create a function Linorm which takes one argument, M a square matrix and computes the LI-norm of the matrix. This is a number associated to each square matrix M, denoted lIMll, as follows. For each column of the matrix we add together the absolute values of the entries in that column, and we then take the maximum of...
help wanted? Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called d from the third column of matrix a. (Hint, typing d 22: 5: 821 b) Combine matrix b and matrix d to create matrix e, a two-dimensional matrix with three rows c) Combine matrix b and matrix d to create matrix f, a one-dimensional matrix with six rows and d) Create matrix g from matrix a and the first three element of matrix...
please provide the matlab working screenshot 4. Consider the matrix 1 1 0 -1 0 -1 1 3 12 1 1 (a) Use Matlab to determine the reduced row echelon form of A. (b) If v, v2, vs, v4 are the column vectors of the matrix A, use your result from (a) to obtain a basis for the subspace of W-lin[vi, V2, vs, v4. Write the basis in the box below. 4. Consider the matrix 1 1 0 -1 0...
Create a matrix with 3 rows and 4 columns. Every element in the first row should be 0, every element in the second row should be 1, and every element in the third row should be 2. But don’t just type out all the numbers. Use some ingenuity. Display the matrix using MATLAB.