Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Who can help me to solve it by Matlab? 3) Write a script which receives 2 integers, A and B. Then it should check to
Who can help me to solve it by Matlab?
3) Write a script which receives 2 integers, A and B. Then it should check to see if the two integers are more than 10 apart - if so, it should output the message "Your numbers are too far apart please try again!". Otherwise, it should then determine if the first one is bigger than the second one - if so, have your routine switch the values; if not, leave them alone [see hint at end]. And then have your routine create a vector called myvec which starts with the smaller integer, ends with the larger integer, and has all of the integers between. HINT: to swap values, use a "temporary" storage variable. So to swap the values of A and B, you can do something like: temp A, A-B, B-tempStep 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