Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use matlab or octave to code 7. (Character-Number Matching) Given an alphabetic character and a number, we wish to determine if the character corresponds to

image text in transcribed

use matlab or octave to code

7. (Character-Number Matching) Given an alphabetic character and a number, we wish to determine if the character corresponds to the number in terms of alphabetic ordering. For instance, we consider 'a' and 'A' to correspond to the number 1, and we consider 'e' and 'E' to correspond to the number 5. Notice that we want the calculation to work for both lowercase and upper case letters. compare_char_num.m Script: Input variables: the_char and the_num representing the character and the number which we wish to determine if they match Output variables: is_equal which is a logical value representing whether or not the char- acter matches the number . Two sample cases are: >> the_char = 'e'; >> the num = 5; >> compare_char_num is_equal = 1 >> the_char = A; >> the num = 3; >> compare char is_equal = 0 {_num

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions