Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB Coding pastrySales Do not hardcode, please use MATLAB to solve Function Name: pastrySales Inputs: 1. (double) A vector of doubles representing the bakery's profits
MATLAB Coding pastrySales
Do not hardcode, please use MATLAB to solve
Function Name: pastrySales Inputs: 1. (double) A vector of doubles representing the bakery's profits every other day Outputs: 1. (double) A vector of doubles representing the bakery's profits every day Banned Functions: interpl Topics: (interpolation). (iteration) Background: You work for Grandma's Pastry Shop. As much as you love her, her organization skills (or lack thereof) make you a bit crazy. For instance, she doesn't even know what half of the daily profits from last week are because she smudged icing on the paper! You set off on a mission to find the numbers and help Grandma get organized with your handy friend Matlab. Function Description: Given a vector of every other days' profits, estimate the profits for each missing day by averaging the profit from the day before and after it. The output vector should contain the values present in the original vector, as well as each average value placed between the two numbers that were used to find it Example: knownProfits = [50 60 44] outVes = pastry3ales (knownProfits) outVec -> 150 55 60 52 44] Notes: You will not have to worry about rounding. (All interpolated values will be integers.) The input vector is guaranteed to be at least length 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started