Value for the side of the octagonal prism

Assignment Help MATLAB Programming
Reference no: EM13163254

Create a function that will draw an octagonal prism as shown below. The base of the prism is a regular octagon (all the sides are equal). This function should have 3 function inputs (input parameters): an array that contains the xyz values of the point of origin, P0; a scalar value for the side of the octagonal prism, and a scalar value for the height of the octagonal prism. Generate the x,y,z arrays that define the 9 faces of the pyramid (octagonal base and 8 triangles. Use fill3 command to create the faces (faces with parallel bases should be in the same color). You may either plot the front faces, set the transparency, then draw the back faces as shown below or plot all the faces and then set the transparency. You do not have to label the axes or show the point of origin. In the script file prompt the user to enter the values for the origin, the side of the base and the height and call the function.

 

Reference no: EM13163254

Questions Cloud

Show the bitmap : Show the bitmap after:a) File B is written, using 3 blocks b) File A is deleted. c) File C is written, using 4 blocks
What is the molar mas of agno3 : suppose you want to find out how many milliliters of 1.0 M AgNO3 are needed to provide 169.9g of pure AgNO3.
Describe the reactant and products of the chemical reaction : Describe the reactant and products of the chemical reaction. Was the reactant (potato chip) completely consumed? What evidence supports your answer?
What is the new pressure of the bicycle tire : a bicycle tire is filled with air to a pressure of 100 psi at a temperature of 100 degrees C. Riding the bike on asphalt on a hot day increases the temperature of the tire to 58 degrees C. the volume of the tire is increased by 4%. what is the new..
Value for the side of the octagonal prism : Value for the side of the octagonal prism, and a scalar value for the height of the octagonal prism. Generate the x,y,z arrays that define the 9 faces of the pyramid (octagonal base and 8 triangles. Use fill3 command to create the faces (faces wit..
What is classification of each reactant as metal or nonmetal : what is the classification of each reactant as metal or nonmetal?
Various types of accounting systems : Write a paper in which you summarize the various accounting systems that each firm provides and various types of accounting systems
Which of these three slip directions is most favored : A single crystal of a metal is oriented for a tensile test such that its slip plane normal makes an angle of 65.5° with the tensile axis. Three possible slip directions make angles of 30°, 48°, and 78° with the same tensile axis.
What is the half-life of a compound : What is the half-life of a compound if 89 percent of a given sample of the compound decomposes in 56 min? Assume first-order kinetics.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Generate by means data.m an array

Generate by measdata.m an array A withsize (365,24), containing temperature measurements for an entire year [1 January,..., 31 December], 24 hours a day [00.00h,...,23.00h].

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Design and explain a computer-based simulation model

Design and explain a computer-based simulation model which you will use to estimate the probability that among 25, 50, 75, 100, 500, or 1000 randomly chosen people, at least 2 people share the same birthday.

  Write a user defined function

Write a user defined function FindFrequency which inputs are a time and a wave elevation vector and output the approximated wave frequency (fappr=FindFrequency(t,eta)).

  Computes the stiffness matrix for one bilinear element with

write Matlab code that computes the stiffness matrix for one bilinear element with 4 nodes

  write a function under the name "write2"

a)Write a function under the name "write2" so that it will save the diagonal component of the given matrix...

  Explore the design of a recursive digital filter

In this simulation we are going to explore the design of a recursive digital filter which might be usedvin a digital radio station. The sampling frequency used in digital radio (DAB) is either 48 kHz or 24 kHz and for the purposes of this simulation,

  Matlab: create a function that will use the secant method

MATLAB: Create a function that will use the Secant method

  Time domain design and analysis

To design a "custom" controller to reduce the vibrations of the seat and a PID controller to reduce the vibration of the seat

  Fingerprint watermarking techniques

Need to investigate the best method to embed watermark image into fingerprint image.

  Write a function in matlab

write a function in MATLAB

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd