Question

Homework 02-Vectors, Strings, and Masking Function Name: forecast Inputs 1. (char) A character vector of the current forecast

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Script: forecast.m

function out = forecast(s, x, y)
l = length(x);
v = strfind(s, x);
out = [s(1:v-1) y s(v+l:end)];
end

Execution and Output:

> out - forecast This snowy weather is so cold. . cold, awesome) S> >>out out-This snowy weather is so awesome S>

Add a comment
Know the answer?
Add Answer to:
Homework 02-Vectors, Strings, and Masking Function Name: forecast Inputs 1. (char) A character vector of the current fo...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Thank you for your help! Homework 02 - Vectors, Strings, and Masking Function Name: badWeatherman Inputs: 1. (logical)...

    Thank you for your help! Homework 02 - Vectors, Strings, and Masking Function Name: badWeatherman Inputs: 1. (logical) Vector of suspect #1's answers to a lie detector (logical) Vector of suspect #2's answers to a lie detector (logical) Vector of suspect #3's answers to a lie detector (logical) Vector of suspect #4's answers to a lie detector 2" 3. 4. Outputs 1. (char) Sentence stating which suspect stole the fruit Banned Functions: isequal (, isequaln( Background Oh no, there has...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT