%========================================================================== % PROBLEM 1. Expand or Diminish a Vector %-------------------------------------------------------------------------- % % Function Name: vecResize % Inputs (2): - (double) a row vector % - (double) factor by which to expand or diminish the vector % Outputs (1): - (double) interpolated vector % % Function Description: % Write a function "vecResize" that takes in a vector and a factor by % which to increase or decrease its length for the output vector. The % output will be a vector that has interpolated values based on the % original vector. % % Interpolating a vector whose size must be expanded or diminished % requires reindexing of the original vector that follows the algorithm % below: % % 1. Determine the new output vector length by multiplying the length % of the input vector with the factor of change. Since this new % size could be a non-integer, be sure to always *round up* to % the nearest integer after multiplying the original length by the % factor of change. % 2. Create a vector of indices that is the same size as the new % output vector. This vector of indices begins at the starting % index (1) and ends at the last index of the original input % vector (e.g., if the original vector has 9 numbers in it, then % the last number in the vector of indices will be 9), and all % numbers in between the first and last index are evenly spaced % apart. % 3. Round the result of the index vector from Step 2. % 4. Use the rounded index vector from Step 3 to reindex the original % vector. % % Note: % - You may find the linspace(), ceil(), and round() function useful.
Real life questions: IRL First name (No last name here, we don't want anyone stalking): Age (I know you just made your forum age high cuz you werent sure if the was a min. age): Favorite Food (Chocolatecheese is already taken): Favorite song (If you say "Yellow by Coldplay" then you win the game of life): Favorite Movie (My TS3/Skype buddies know mine): ECC/MC questions Current Bal: Highest bal: Biggest Lotto win: Join Date: Favorite Memory:
Mon 8:00AM Mon 9:30AM Tue 8:00AM Tue 9:30AM Wed 8:00AM Wed 9:30AM Thu 8:00AM Thu 9:30AM Fri 8:00AM Fri 9:30AM Sun 6:30AM Sun 7:30AM
Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved. C:\Users\xOSneakyBaconOx>cd C:\Users\xOSneakyBaconOx\Desktop\Android C:\Users\xOSneakyBaconOx\Desktop\Android>adb sideload ROM.zip * daemon not running. starting it now on port 5037 * * daemon started successfully * error: device not found C:\Users\xOSneakyBaconOx\Desktop\Android>adb sideload ROM.zip error: device not found C:\Users\xOSneakyBaconOx\Desktop\Android>adb sideload ROM.zip sending: 'ROM.zip' 100% C:\Users\xOSneakyBaconOx\Desktop\Android>
IGN (In-Game-Name/Username): jrg5978 How long have you played EcoCityCraft for: 1 year, 2 months What do you think is currently the number one thing missing from ECC: A way to keep horses safe. Is there any new game modes/styles you would like to see in the future: Maybe another game like survival games to make money. If we were to make an ECC Cloud system with various servers which mini-games would interest you the most? (Example: "Skyblock") While I wouldn't want ECC to become an all minigame server I do like the idea of adding a few more games. Maybe The bridges, although that would create tons of lag. Is there any new donation features you would like to see in the future: A $15 giftcard. Have you given us a diamond at http://tinyurl.com/eccdiamonds : Yes