ABCs_strings

ABCs_strings - function [A B C D E F G H I J] =...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function [A B C D E F G H I J] = ABCs_strings(str1, str2, vec1, alph1, ch1, double1) % ABCs of Strings % % This is a multi-part problem. Do each of the parts below. % % DO NOT CHANGE THE FUNCTION HEADER (the first line of code) % % Store your answer in the variable A. A = double(str1); %<fix this line>% A % b) Casting to strings. Cast vec1 to a character array (string). Store % your result in a variable named B. B = char(vec1); %<fix this line>% B % c) Slicing and Concatenation. Make a new string which is the % concatenation of all of str1, then a space, and % then all of str2. Store your result in a variable named C. C = ([str1, ' ', str2]); %<fix this line>% C % d) Arithmetic Operations. alph1 is some letter of the alphabet, but it % is not the letter 'a' or 'A'. Find the letter preceding alph1. Your % answer should be in the same case as alph1. Store your result in a % variable named D. D = char(double(alph1) -
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.

Page1 / 2

ABCs_strings - function [A B C D E F G H I J] =...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online