readme.txt

来自「If we have two individually sorted vecto」· 文本 代码 · 共 20 行

TXT
20
字号
mergesorted.m
------------------
If we have two individually sorted vectors 乪a乫 and 乪b乫 but they are not sorted with respect to each other and we want to merge them into vector 乪c乫 such that 乪c乫 is also a sorted vector. Then c=mergesorted(a,b) can be used.

This function most likely make difference for very large vectors (may be elements in million). On P-4 machine when length of 乪a乫 is 2 million and length of 乪b乫 is 2.5 million then c=mergesorted(a,b) is around 3 times faster than using MATLAB builtin function c=sort([a,b]).

testmergesorted.m
----------------------
A simple test program to that test 乪mergesorted乫 and builtin 乪sort乫 function and compare their performance.

---------------------------------------------------------------------------------------------------------
Copyright
This program or any other program(s) supplied with it does not
provide any warranty direct or implied. This program is free to
use/share for non-commerical purpose only as long as author is referenced.
For commerical purpose usage contact with author:
contact: M A Khan
Email: khan_goodluck@yahoo.com
 http://www.m-a-khan.blinkz.com/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?