Question
create a matlab flow chart based onthe following bubble sorting code
bubble sort clear,clc disp( You are about to initiate bubble sorting disp( Hey there! we are creating a 10 value v pause(1)
options menu(Are you ready yet?, yes, No) pause(1) end a- input( What sthe first value of the matrix? b- input( What
xe [a,b,c,d,e,f,g,h,r,j] % loop to display the array for 1-1:length(x) disp(x(1)) end % So, now lets store this matrix in a
bubble sort clear,clc disp( 'You are about to initiate bubble sorting disp( Hey there! we are creating a 10 value v pause(1) options menu( Are you ready?', 'yes', No') pause(1) options menu Are you ready?', 'yes', No') while(option 1) pause(2) option- menu Are you ready yet?', 'yes', 'No) pause(1) end a- input( What' "sthe first value of the matrix?") b- input(' what' 'sthe second value of the matrix?") c input What 'sthe third value of the matrix?) d input wWhat 'sthe fourth value of the matrix?) einput what 'sthe fifth value of the matrix?) f- input( What' 'sthe sixth value of the matrix?) g input what'sthe seventh value of the matrix?")
options menu('Are you ready yet?', 'yes', 'No') pause(1) end a- input( What 'sthe first value of the matrix?" b- input( What sthe second value of the matrix?") cs input( What 'sthe third value of the matrix?) de input( What sthe fourth value of the matrix?) e- input( What' sthe fifth value of the matrix?") f- input( What' 'sthe sixth value of the matrix?) e ingut(: hste " sthe seventh value of the matrise) h input( What 'sthe eighth value of the matrix?) r input( what' 'sthe ninenth value of the matrix?) j- input( What 'sthe tenth value of the matrix?') x» [a,b,c,d,e,f,g,h,r,j] | % loop to display the array for 1-1:length(x) disp(x(1)) end % So, now let's store this matrix in a separate file called 'bubble sort' ritematrix(x, 'Bubblesont.txt:)
xe [a,b,c,d,e,f,g,h,r,j] % loop to display the array for 1-1:length(x) disp(x(1)) end % So, now let's store this matrix in a separate file called ,bubble sort' writematrix(х,' Bubblesort.txt) % Now we initiate bubble coding re length(x) for k-1:1:r-1 % Here we will be comparing an element with the one that follows Jumping % the elements one at a time until n-1 (length-1) position for u- 1:1:r-1 % if u in matrix x is larger than the next if x(u)>x(u+1) storage. x(u) % we set it aside to be stored so the shifting can occur x(u)-x(u+1) x(u) will be move further the % and down line x(u+1)-storage end end
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Start Dapay imskucthens like ane ob vector Ask oser Wait or 2 Seconds Rea optiov if Read aValues ab,cd,e,f,g,h, i, j store thWrta Vector X into -file mame Kー if Nlo Yes if 0 木 Yes END x (torage

Here instructions refer message showing "you are about to initiate bubble sorting and we are creating a 10 value vector"

Add a comment
Know the answer?
Add Answer to:
create a matlab flow chart based onthe following bubble sorting code bubble sort clear,clc disp( 'You are about to initiate bubble sorting disp( Hey there! we are creating a 10 value v pause...
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
  • Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an...

    Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an order at a fast-food burger joint. This class will be used in Part B, when we work with a list of orders. As vou work through this part and Part B, draw a UML diagram of each class in using the UML drawing tool 1) Create a new Lab5TestProject project in Netbeans, right-click on the lab5testproject package and select New>Java Class 2) Call your...

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