Question

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

How do I solve using Matlab?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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..

Mesh plot Surface plot *1041 x 1041 10 10 N 5 N 5 10 10 100 100 1019 *1019 50 5 50 Y 0 0 X 3-Dimentional plot 5 Y 0 0 X Surfa

Add a comment
Know the answer?
Add Answer to:
How do I solve using Matlab? Create a matrix X so that the first row has...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MATLAB QUESTION !!! PLEASE USE MATLAB FOR BOTH QUESTIONS!!! THANKS 3) Below is a matrix of...

    MATLAB QUESTION !!! PLEASE USE MATLAB FOR BOTH QUESTIONS!!! THANKS 3) Below is a matrix of random numbers. Find the mean, median, and mode of the matrix. B=[0 1 2 3 4 50689 23092 6 8 407] 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. 4) Create a matrix X so that the first row has values from 0 to...

  • 1) Create a matlab function that calculates: for Name your function TwoVarFunc : The inputs should...

    1) Create a matlab function that calculates: for Name your function TwoVarFunc : The inputs should be in the same order: xmin xmax ymin ymax N: n is the number of elements in the vector x and y The ouputs should be in the same order: f_xy: is the calculated array f(x,y) f_xyMAX: should be the the maximum value of the function f(x,y). Hint: to create vectors x and y look up the matlab built-in function linspace() Hint 2: To...

  • How do I solve using Matlab? Below is a matrix of random numbers. Find the mean,...

    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.

  • Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called ...

    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 help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any d...

    Please help me with this MATLAB programming problem! Im coding iin MATLAB2018 if that makes any difference! The first picture is the question i need to answer. The picture below is used as reference to answer the question. The last picture (below) is the into to the problem, and is used as reference. 1. Use Matlab to create the following single plot with three subplots. All titles, gridlines, and axis labels should be as shown. Arc System Response 15 E...

  • I need help solving these questions,please don’t know how to solve it by using matlab.!

    i need help solving these questions,please don’t know how to solve it by using matlab.! Solve the following questions Ol: You are required to develop a script to calculate the volume of a pyramid, which is 1/3 *base *height, where the base is length *width. Prompt the user to enter values for the length, width, and height, and then calculate the volume of the pyramid. When the user enters each value, he or she will then also be prompted to...

  • Need help. Stuck and not sure how to finish this program. I'm using MatLab R2016a and...

    Need help. Stuck and not sure how to finish this program. I'm using MatLab R2016a and would appreciate any help. Thanks. In this project, you will perform transient analysis on a L 3 cm steel cube. The steel has the following properties: k 50 WImK, p 7800 kg/m3, cp 500 J/kgK. The cube is initially at a uniform temperature of 800 deg C, then is dropped into an oil bath at To 40 deg C. I. Create a program that...

  • A group of physics students collected data from a test of the projectile motion problem that...

    A group of physics students collected data from a test of the projectile motion problem that was analyzed in a previous lab exercise (L5). In their test, the students varied the angle and initial velocity Vo at which the projectile was launched, and then measured the resulting time of flight (tright). Note that tright was the dependent variable, while and Vo were independent variables. The results are listed below. (degrees) Time of Flight (s) Initial Velocity V. (m/s) 15 20...

  • Question 6: We will consider a piece-wise constant 1D signal in this part. Assume the signal...

    Question 6: We will consider a piece-wise constant 1D signal in this part. Assume the signal (a function f(t)) contains S = 10 discrete sub-intervals of equal length. Each sub-interval contains 50 samples. This signal is given below in the variable signal acquired at sample locations sampling_locations (also provided below). Plot the 1D signal, create one plot with the regular plot commands and one plot with the stem command (use subplots to plot the two next to each other in...

  • Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the...

    Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the motion of an object projected into the air at an angle. The object flies in the air until the projectile returns to the horizontal axis (x-axis), where y=0. This MATLAB program should allow the user to try to hit a 2-m diameter target on the x-axis (y=0) by varying conditions, including the lunch direction, the speed of the lunch, the projectile’s size, and the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT