Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use mathlab Search Results XY a 404-File or directory no /MAT LAB/CS%201 371 /Hw03-Drillproblems.pdf Function Name: sweaterWeather Inputs: 1. (char) A 1xN vector of characters
use mathlab
Search Results XY a 404-File or directory no /MAT LAB/CS%201 371 /Hw03-Drillproblems.pdf Function Name: sweaterWeather Inputs: 1. (char) A 1xN vector of characters 2. (char) A second 1xN vector of characters Outputs: 1. (char) A new 1x(2 N) woven vector Background Upon discovering the forecast for chilly weather this morning, you don your favorite striped sweater! You notice the pattern of alternating threads woven into your sweater, and (being a MATLAB enthusiast) you decide to write a function that can weave vectors together in a pattern much like that of the threads in your own dashing cardigan. Function Description: Weave two vectors together, alternating between one letter of the first vector and one letter of the second vector, such that the output vector contains the characters of the first vector at its odd indices and of the second vector at its even indices. Example: the vector HLovelrle Given the character vectors mean and 'soetd , your function should utput Notes: . You are guaranteed that the input vectors will be of the same length (N 2 1) . Be sure that your output is of type char Hints: Think about how you can use the colon operator to create an index vectorStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started