Question

COP2271 MATLAB Module 09 Activities Activity C Given a sentence/phrase, reverse all letters and punctuation in each individua

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

`Hey,

Note: If you have any queries related to the answer please do comment. I would be very happy to resolve all your queries.

clc

clear all

close all

format long

s=input('Enter any phrase: ','s');

ss=split(string(s));

ns=[];

for i=1:length(ss)-1

s1=char(ss(i));

ns=[ns,s1(end:-1:1),' '];

end

i=length(ss);

s1=char(ss(i));

ns=[ns,s1(end:-1:1)];

fprintf('Adjusted phrase: %s\n',ns);

2 - 3 4 - 5 6 7 - 8 - 9 10 11 12 13 14 - clear all close all format long s=input(Enter any phrase: ,S); ss=split(string(s

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
COP2271 MATLAB Module 09 Activities Activity C Given a sentence/phrase, reverse all letters and punctuation in...
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
  • Palindrome Detector C++ A palindrome is any word, phrase, or sentence that reads the same forward...

    Palindrome Detector C++ A palindrome is any word, phrase, or sentence that reads the same forward and backward. Here are some well-known palindromes: Able was I, ere I saw Elba A man, a plan, a canal, Panama Desserts, I stressed Kayak Write a program that determine whether an input string is a palindrome or not. Input: The program should prompt the user "Please enter a string to test for palindrome or type QUIT to exit: " and then wait for...

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