Preview

Small Rocket: Vicinity Of Thunderstorms

Good Essays
Open Document
Open Document
525 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Small Rocket: Vicinity Of Thunderstorms
1) A small rocket is being designed to make wind shear measurements in the vicinity of thunderstorms. Before testing begins, the designers are developing a simulation of the rocket's trajectory. They have derived the following equation that they believe will predict the performance of the test rocket, where t is time elapsed in seconds. The equation gives the height above the ground level at time t. The first term (60) is the height above ground level of the nose of the rocket. height = 60 + 2.13t^2 − 0.0013t^4 + 0.0003t^4.571
a) Write a program to compute and print the time and height of the rocket from t = 0 to the time that it hits the ground, in increments of 2 secs. If the rocket has not hit the ground within 100 secs, stop the program.
…show more content…

2. Given a string of characters, we can permute the individual characters to make new strings. If we can impose an ordering on the characters (say alphabetic sequence),then the strings themselves can be ordered and any given permutation can be given a unique number designating its position in that ordering. For example the string `acab' gives rise to the following 12 distinct permutations:
Thus the string `acab' can be characterized in this sequence as 5.
Write a MATLAB program that will read in a string and determine its position in the ordered sequence of permutations of its constituent characters.
Input and Output
Input will consist of a series of lines, each line containing one string. Each string will consist of up to 30 lower case letters, not necessarily distinct.
Output will consist of a series of lines, one for each line of the input. Each line will consist of the position of the string in its


You May Also Find These Documents Helpful

  • Satisfactory Essays

    Homework Week 2

    • 743 Words
    • 3 Pages

    c. Design an algorithm in pseudocode to solve this problem. Make sure to include steps to get each input and generate each output.…

    • 743 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Unit 7 Study Guide

    • 582 Words
    • 3 Pages

    22.Write a program to read a sequence of characters and display them in reverse order on the next line. Page: 144…

    • 582 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Write which populates an array with integer values read from a file. The program must take the items in the array and reverse them. You may use one array only to solve this problem.…

    • 1086 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Living Your Dreams

    • 59499 Words
    • 238 Pages

    Preface Preface to the first edition Introduction 1. Chapter 1: A Tutorial Introduction 1. Getting Started 2. Variables and Arithmetic Expressions 3. The for statement 4. Symbolic Constants 5. Character Input and Output 1. File Copying 2. Character Counting 3. Line Counting 4. Word Counting 6. Arrays 7. Functions 8. Arguments - Call by Value 9. Character Arrays 10. External Variables and Scope 2. Chapter 2: Types, Operators and Expressions 1. Variable Names 2. Data Types and Sizes 3. Constants 4. Declarations 5. Arithmetic Operators 6. Relational and Logical Operators 7. Type Conversions 8. Increment and Decrement Operators 9. Bitwise Operators 10. Assignment Operators and Expressions 11. Conditional Expressions 12. Precedence and Order of Evaluation 3. Chapter 3: Control Flow 1. Statements and Blocks 2. If-Else 3. Else-If 4. Switch 5. Loops - While and For 6. Loops - Do-While 7. Break and Continue 8. Goto and labels…

    • 59499 Words
    • 238 Pages
    Good Essays
  • Satisfactory Essays

    Formatting Code Python

    • 451 Words
    • 2 Pages

    and goes further than this quick document. We have tried to select the most useful codes here. Strings We consider the string “Hello, world!”. Formatting code %s %20s %-20s %3s Hello, world! 'Hello, world' ' Hello, world!' 'Hello, world! ' 'Hello, world'…

    • 451 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Symtab

    • 1520 Words
    • 7 Pages

    { flag=1; switch(l) { case 0: i++; break; case 1: f++; break; case 2: cc++; break; case 3: d++; break; } goto next; } } if(flag==1) { int exist=notexist(tok); if(exist!=0) {…

    • 1520 Words
    • 7 Pages
    Good Essays
  • Powerful Essays

    Data Structure

    • 15907 Words
    • 64 Pages

    Data Structures Using C After working through this module you should be able to manipulate character strings in C programs…

    • 15907 Words
    • 64 Pages
    Powerful Essays
  • Powerful Essays

    Nadarajan, K., and Zukarnain, Z. A. (2008). Analysis of string matching compression algorithm. Journal of Computer Science, 4(3), 205-210.…

    • 7853 Words
    • 32 Pages
    Powerful Essays
  • Powerful Essays

    Basic Shell Scripting

    • 33932 Words
    • 136 Pages

    Basic Control Statements 44 The if Statement 44 The test Command and Bracket Notation 46 The while Statement 48 The for Statement 50 The case statement 53 The expr Command 56 Parsing, Variable Expansion, and Quoting 59 Variable Expansion and Field Separators 60 Special Characters Explained 61 Quoting Special Characters 64 Inline Execution 66…

    • 33932 Words
    • 136 Pages
    Powerful Essays
  • Satisfactory Essays

    java

    • 258 Words
    • 2 Pages

    A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace. The resulting tokens may then be converted into values of different types using the various next methods.…

    • 258 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Load location $00003030 with $0E29 and location $00003032 with $184C. Run your program and examine the contents of memory location $00003034. Enter the word which you find in this location.…

    • 352 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Encrypt/Decrypt

    • 317 Words
    • 2 Pages

    written that encodes the text by advancing each character by 3 letters. Same procedure is…

    • 317 Words
    • 2 Pages
    Good Essays
  • Better Essays

    coaiso

    • 4410 Words
    • 34 Pages

    given and find the answers. Finding the rule followed by the machine is the key task. Once you…

    • 4410 Words
    • 34 Pages
    Better Essays
  • Good Essays

    Review

    • 600 Words
    • 3 Pages

    The researchers have selected the Boyer-Moore string matching algorithm because it is used in most software applications. Usually, it is used for searching and replacingtext in a text editor or word processing application.It is known for its efficiency. [WWW_003]. One of the many text editors that use this algorithm is the Subpad. It is a notepad with cloned features of Windows notepad. It is made faster by this algorithm that is written in assembler.Boyer-Moore string matching algorithm is developed by Robert Boyer and J Strother Moorein their paper in 1997 [REF_001]. It is practically used in the search command of all text editors [REF_002].…

    • 600 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    3. In BASIC programming language which character is used as a last character with string variable?…

    • 477 Words
    • 2 Pages
    Satisfactory Essays