matlab
yangfang2111
这个作者很懒,什么都没留下…
展开
-
matlab堆排序
function [ A ] = heapsort( A )%UNTITLED14 Summary of this function goes here% Detailed explanation goes hereA=build_max_heap(A);[m,n]=size(A);for i=n:-1:2 temp=A(1); A(1)=A(i);原创 2015-07-06 18:12:27 · 2278 阅读 · 1 评论 -
matlab冒泡排序
function [ A ] = buble( A )%UNTITLED3 Summary of this function goes here% Detailed explanation goes here[m,n]=size(A);for i=1:n for j=2:n if A(j-1)>A(j) temp=A(j-1原创 2015-07-06 16:12:19 · 3444 阅读 · 0 评论 -
matlab插入排序
function [ A ] = insertSort( A )%UNTITLED4 Summary of this function goes here% Detailed explanation goes here[m,n]=size(A);for i=1:n for j=2:n temp=A(j); while j>1&&temp原创 2015-07-06 16:13:55 · 1743 阅读 · 0 评论