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

  Write a simple program that stores the high temperatures

A meteorological company wants you to write a simple program that stores the high temperatures and low temperates for each of the months of the year. After consulting with trusted programming partners, you come up with a great idea

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Mobile robot control and potential field

Write a MATLAB code to compute forces due to each obstacle and goal. Compute total force on vehicle at point(x,y).

  Fourier transform and biosignal analysis

Fourier Transform and Biosignal Analysis - series data into its frequency components for the purpose of signal analysis and processing.

  Plot the lines using the inputted vector of x values and x

Write a function named solveSystem that has three inputs: two vectors consisting of coefficients [a b c] of two line equations of the form ax + by = c and a vector of x values.

  Implement linear support vector machine to classify data

code to implement linear Support vector machine to classify data (without using matlab built in function).

  Simulate rigid body mechanics

Write a MATLAB code to simulate rigid body mechanics. Create a video file of a free falling rod. Neglect effects from drag or loss of kinetic energy. Make sure the rod falls onto one end showing how the rigid body reacts to hitting the ground. Cannot..

  Modeling mechanical systems with matlab

MATLAB, developed by MathWorks, is a popular software that is widely used in areas of engineering, science, education and finance. Simulink is an environment for multidomain simulation and Model-Based Design for dynamic and embedded system.

  Develop a well-structured function

Develop a well-structured function to compute v as a function of t. Then use this function to generate a table of v versus t for t = -5 to 50 at increments of 0.5.

  Implement the finite difference method

Write a computer program to implement the finite difference method. The program can be in any computer language that is available within the school. Set up the code to find the potential for a parallel plate capacitor in the box shown below, all dime..

  Determine the specular component

Reparemeterizing each pixel point using spherical coordinates and rotation RGB color space to SUV color space in the paper

  First ten numbers of the sequence of pseudorandom numbers

write a program that gives the first ten numbers of the sequence of pseudorandom numbers

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