- #1
gfd43tg
Gold Member
- 950
- 50
Homework Statement
I am working on Problem #2 in the attached PDF
Homework Equations
The Attempt at a Solution
I am trying to understand what they are saying in (b) as far as creating the double array. Does that mean I concatenate strIn with keyL? Also, how do I remove the last few characters in keyL so that numel(keyL) == numel(strIn). I'm having a hard time getting started because I don't really understand what they are saying in the question as far as what to do.
Here is what I have so far, it's far from complete but I don't know if I should use a while statement.
Code:
function strOut = Convert(strIn,key,mode)
keyL = [key key];
if mode == 1
while (numel(keyL) >= numel(strIn)) == 1
numel(keyL) == numel(strIn)
for i = 1:numel(keyL)