document.body.clientWidth*0.5) {this.resized=true;this.width=document.body.clientWidth*0.5;this.style.cursor='pointer';} else {this.onclick=null}" alt="" />
Product Details
Hardcover: 504 pages
Publisher: Chapman & Hall/CRC (April 15, 2004)
Language: English
ISBN: 1584883480
Product Dimensions: 9.6 x 6.4 x 1.3 inches
Shipping Weight: 1.9 pounds. (View shipping rates and policies)
Average Customer Review: based on 4 reviews. (Write a review.)
Amazon.com Sales Rank: #66,595 in Books (See Top Sellers in Books)
Yesterday: #52,854 in Books
(Publishers and authors: improve your sales)
Customer Reviews
Average Customer Review:
Write an online review and share your thoughts with other customers.
[code]<SCRIPT language=javascript>
function StaticDataProvider(data) {
this.data = data || new Array();
this.onDataReady = function() {
};
}
StaticDataProvider.prototype.setWrappedData = function(data) {
this.data = data || new Array();
}
StaticDataProvider.prototype.getWrappedData = function(data) {
return this.data;
}
StaticDataProvider.prototype.setSorting = function(comparator) {
this.comparator = comparator;
this.invalidate();
}
StaticDataProvider.prototype.clearSorting = function() {
this.comparator = null;
this.invalidate();
}
StaticDataProvider.prototype.setFilter = function(filter) {
this.filter = filter;
this.invalidate();
}
StaticDataProvider.prototype.clearFilter = function() {
this.filter = null;
this.invalidate();
}
StaticDataProvider.prototype.invalidate = function() {
this.isValid = false;
}
StaticDataProvider.prototype.refreshData = function() {
if (this.isValid) {
if (this.onDataReady) {
this.onDataReady(result);
}
//return this.result;
}
var result = new Array();
if (this.filter) {
var data = this.data;
for (var i = 0; i < data.length; i++) {
if (this.filter.accept(data)) {
result[result.length] = data;
}
}
} else {
result = this.data.slice();
}
if (this.comparator) {
result.sort(SuggestionUtils.bind(this.comparator.compare, this.comparator));
}
this.result = result;
this.isValid = true;
if (this.onDataReady) {
this.onDataReady(result);
}
//return result;
}
function RegExpFilter(filterValue, matchBeggining) {
this.matchBeggining = matchBeggining;
if (filterValue) {
this.setFilterValue(filterValue);
}
}
RegExpFilter.prototype.accept = function(value) {
if (!this.re) {
return false;
}
return this.re.test(value);
}
RegExpFilter.prototype.getFilterValue = function() {
return this.filterValue;
}
RegExpFilter.prototype.escapeRegexChars = function(value) {
if ( ! RegExpFilter.prototype.escapeRegexCharsExpression ) {
var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\' ];
RegExpFilter.prototype.escapeRegexpCharsExpression = new RegExp(
'(\\' + specials.join('|\\') + ')', 'g');
}
return value.replace(this.escapeRegexpCharsExpression, '\\$1');
}
RegExpFilter.prototype.setFilterValue = function(filterValue) {
this.filterValue = filterValue;
var t = this.escapeRegexChars(this.filterValue);
if (this.matchBeggining) {
this.re = new RegExp("^" + t, "i");
} else {
this.re = new RegExp(t, "i");
}
}
//===========================================================================================
function Suggestion(id, options) {
this.options = SuggestionUtils.copyObject({
limit : 12,
matchBeggining : false,
showTimeout : -1,
popupTimeout : 250,
sugestionListStyle : "sugestionList",
sugestionItemStyle : "sugestionItem",
sugestionItemSelectStyle : "sugestionItemSelect",
sugestionHighlightStyle : "sugestionHighlight",
sugestionItemMoreStyle : "sugestionItemMore"
}, options || {});
this.id = id;
this.suggestionList = new SuggestionList(this.id + "-list", this.options);
this.filter = new RegExpFilter(null, this.options.matchBeggining);
this.options.dataProvider.setFilter(this.filter);
this.options.dataProvider.onDataReady = SuggestionUtils.bind(function(list) {
if (list.length == 0) {
this.hideSuggestionList();
} else {
this.suggestionList.show(
list,
this.input.value,
SuggestionUtils.getPageLeft(this.input),
SuggestionUtils.getPageTop(this.input) + this.input.offsetHeight,
this.input.offsetWidth
);
}
}, this);
SuggestionUtils.observe(window, "load", SuggestionUtils.bind(this.setup, this));
}
Suggestion.prototype.setup = function() {
this.input = $(this.id);
this.input.onkeydown = SuggestionUtils.bindAsEventListener(this.onInputKeyDown, this);
this.input.onkeyup = SuggestionUtils.bindAsEventListener(this.onInputKeyUp, this);
this.input.onkeypress = SuggestionUtils.bindAsEventListener(this.onInputKeyPress, this);
this.input.onblur = SuggestionUtils.bindAsEventListener(this.onInputBlur, this);
this.suggestionList.setup();
}
Suggestion.prototype.onInputKeyDown = function(evt) {
var keyCode = evt.keyCode;
if (SuggestionUtils.isIE) {
if (keyCode == 38) { // up key
if (this.suggestionList.visible) {
this.suggestionList.moveUp();
}
} else if (keyCode == 40) { // down key
if (this.suggestionList.visible) {
this.suggestionList.moveDown();
}
}
}
if (keyCode == 13) {
if (this.suggestionList.position != -1) {
this.input.value = this.suggestionList.list[this.suggestionList.position];
}
this.hideSuggestionList();
} else if (keyCode == 9) {
this.hideSuggestionList();
}
}
Suggestion.prototype.onInputKeyPress = function(evt) {
if (!SuggestionUtils.isIE) {
var keyCode = evt.keyCode;
if (keyCode == 38) { // up key
if (this.suggestionList.visible) {
this.suggestionList.moveUp();
}
} else if (keyCode == 40) { // down key
if (this.suggestionList.visible) {
this.suggestionList.moveDown();
}
}
}
}
Suggestion.prototype.onInputKeyUp = function(evt) {
//if we press up down or enter we return
if (evt.keyCode == 38 || evt.keyCode == 40 || evt.keyCode == 13) return;
if (this.input.value == "") {
this.hideSuggestionList();
return;
}
if (this.suggestionList.visible) {
this.filterList();
} else {
if (this.popupTimoutId) {
clearTimeout(this.popupTimoutId);
}
this.popupTimoutId = setTimeout(SuggestionUtils.bind(this.filterList, this), this.options.popupTimeout);
}
}
Suggestion.prototype.onInputBlur = function(evt) {
this.suggestionList.hide();
}
Suggestion.prototype.hideSuggestionList = function() {
if (this.popupTimoutId) {
clearTimeout(this.popupTimoutId);
}
this.suggestionList.hide();
}
Suggestion.prototype.filterList = function() {
this.filter.setFilterValue(this.input.value);
this.options.dataProvider.invalidate();
this.options.dataProvider.refreshData();
}
//=======================================================================================================
function SuggestionList(id, options) {
this.id = id;
this.options = options;
this.offset = 0;
this.position = -1;
this.visible = false;
this.list = new Array();
}
SuggestionList.prototype.setup = function() {
this.listTable = document.createElement("table");
this.listTable.id = this.id;
this.listTable.cellSpacing = '1px';
this.listTable.cellPadding = '2px';
this.listTable.style.position = 'absolute';
this.listTable.style.zIndex = 100;
this.listTable.style.display = 'none';
this.listTable.className = this.options.sugestionListStyle;
// this.goUpRow = this.listTable.insertRow(-1);
// var cell = this.goUpRow.insertCell(-1);
// cell.className = this.options.sugestionItemMoreStyle;
// cell.innerHTML = '/\\';
this.rows = new Array();
for (var i = 0; i < this.options.limit; i++) {
var row = this.listTable.insertRow(-1);
cell = row.insertCell(-1);
cell.innerHTML = ' ';
this.rows[this.rows.length] = row;
}
// this.goDownRow = this.listTable.insertRow(-1);
// cell = this.goDownRow.insertCell(-1);
// cell.className = this.options.sugestionItemMoreStyle;
// cell.innerHTML = '\\/';
document.body.appendChild(this.listTable);
if (SuggestionUtils.isIE && SuggestionUtils.isMinIE5_5) {
var iframe = document.createElement("iframe");
iframe.id = this.id + "-iframe";
iframe.frameborder = "0px";
iframe.scrolling = "no"
iframe.style.position = "absolute";
iframe.style.zIndex = 99;
iframe.style.display = "none";
iframe.style.borderStyle = "none";
document.body.appendChild(iframe);
this.iFrame = iframe;
}
}
SuggestionList.prototype.show = function(list, value, left, top, width) {
this.position = -1;
this.offset = 0;
this.list = list;
this.value = value;
this.refresh(list);
this.listTable.style.left = left + "px";
this.listTable.style.top = top + "px";
this.listTable.style.width = width + "px";
this.listTable.style.display = "";
if (this.iFrame) {
this.iFrame.style.top = this.listTable.style.top;
this.iFrame.style.left = this.listTable.style.left;
this.iFrame.style.width = this.listTable.offsetWidth;
this.iFrame.style.height = this.listTable.offsetHeight;
this.iFrame.style.zIndex = this.listTable.style.zIndex - 1;
this.iFrame.style.display = "";
}
this.visible = true;
}
SuggestionList.prototype.hide = function() {
this.position = -1;
this.listTable.style.display = "none";
if (this.iFrame) {
this.iFrame.style.display = "none";
}
this.visible = false;
}
SuggestionList.prototype.setPosition = function(pos) {
if (this.position != pos) {
this.position = pos;
if (this.visible) {
this.scrollInView();
this.refresh();
}
}
}
SuggestionList.prototype.getPosition = function() {
return this.position;
}
SuggestionList.prototype.refresh = function() {
if (!this.list) {
this.hide();
return;
}
// this.goUpRow.style.display = this.offset > 0 ? "" : "none";
// this.goDownRow.style.display = this.offset + this.options.limit < this.list.length ? "" : "none";
var c = this.list.length - this.offset;
if (c < this.options.limit) {
for (var i = 0; i < c && i < this.rows.length; i++) {
this.rows.style.display = "";
this.rows.cells[0].innerHTML = this.createItemHtml(this.list[this.offset + i]);
if (this.position != -1 && this.position == this.offset + i) {
this.rows.cells[0].className = this.options.sugestionItemSelectStyle;
} else {
this.rows.cells[0].className = this.options.sugestionItemStyle;
}
}
for (var i = c; i < this.rows.length; i++) {
this.rows.style.display = "none";
this.rows.cells[0].style.backgroundColor = "";
}
} else {
for (var i = 0; i < this.rows.length; i++) {
this.rows.style.display = "";
this.rows.cells[0].innerHTML = this.createItemHtml(this.list[this.offset + i]);
if (this.position != -1 && this.position == this.offset + i) {
this.rows.cells[0].className = this.options.sugestionItemSelectStyle;
} else {
this.rows.cells[0].className = this.options.sugestionItemStyle;
}
}
}
}
SuggestionList.prototype.moveUp = function() {
if (!this.list) {
return false;
}
if (this.position != -1) {
if (this.position > 0) {
this.position--;
} else {
//this.position = this.list.length - 1;
}
} else {
this.position = this.list.length - 1;
}
this.scrollInView();
this.refresh();
}
SuggestionList.prototype.moveDown = function() {
if (!this.list) {
return false;
}
if (this.position != -1) {
if (this.position == this.list.length - 1) {
//this.position = 0;
} else {
this.position++;
}
} else {
this.position = 0;
}
this.scrollInView();
this.refresh();
}
SuggestionList.prototype.scrollInView = function() {
if (this.position < this.offset) {
this.offset = this.position;
}
if (this.position >= this.offset + this.options.limit) {
this.offset = this.position - this.options.limit + 1;
}
if (this.offset < 0) this.offset = 0;
}
SuggestionList.prototype.createItemHtml = function(n) {
var t = escape(this.value);
var tobuild = '';
var i;
var re;
if (this.options.matchBeggining) {
re = new RegExp("^" + t, "i");
} else {
re = new RegExp(t, "i");
}
var p = n.search(re);
for (i = 0; i < p; i++) {
tobuild += n.substr(i, 1);
}
tobuild += ""
for (i = p; i < t.length + p; i++) {
tobuild += n.substr(i, 1);
}
tobuild += "";
for (i = t.length + p; i < n.length; i++) {
tobuild += n.substr(i, 1);
}
return tobuild;
}
//=====================================================================================================
SuggestionUtils = {};
SuggestionUtils.sUserAgent = navigator.userAgent;
SuggestionUtils.fAppVersion = parseFloat(navigator.appVersion);
SuggestionUtils.isOpera = SuggestionUtils.sUserAgent.indexOf("Opera") > -1;
SuggestionUtils.isIE = SuggestionUtils.sUserAgent.indexOf("compatible") > -1
&& SuggestionUtils.sUserAgent.indexOf("MSIE") > -1
&& !SuggestionUtils.isOpera;
SuggestionUtils.isMinIE4 = SuggestionUtils.isMinIE5 = SuggestionUtils.isMinIE5_5 = SuggestionUtils.isMinIE6 = false;
if (SuggestionUtils.isIE) {
var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
reIE.test(SuggestionUtils.sUserAgent);
var fIEVersion = parseFloat(RegExp["$1"]);
SuggestionUtils.isMinIE4 = fIEVersion >= 4;
SuggestionUtils.isMinIE5 = fIEVersion >= 5;
SuggestionUtils.isMinIE5_5 = fIEVersion >= 5.5;
SuggestionUtils.isMinIE6 = fIEVersion >= 6.0;
}
SuggestionUtils.getPageLeft = function(element) {
element = $(element);
if (!element) return 0;
var x = 0;
while (element) {
if (element.offsetLeft) x += element.offsetLeft;
element = element.offsetParent ? element.offsetParent : null;
}
return x;
}
SuggestionUtils.getPageTop = function(element) {
element = $(element);
if (!element) return 0;
var y = 0;
while (element) {
if (element.offsetTop) y += element.offsetTop;
element = element.offsetParent ? element.offsetParent : null;
}
return y;
}
SuggestionUtils.observe = function(element, name, observer, useCapture) {
element = $(element);
useCapture = useCapture || false;
if (element.addEventListener) {
element.addEventListener(name, observer, useCapture);
} else if (element.attachEvent) {
element.attachEvent('on' + name, observer);
}
}
SuggestionUtils.copyObject = function(destination, source) {
for (property in source) {
destination[property] = source[property];
}
return destination;
}
SuggestionUtils.bind = function(fct, object) {
var __method = fct;
return function() {
__method.apply(object, arguments);
}
}
SuggestionUtils.bindAsEventListener = function(fct, object) {
var __method = fct;
return function(event) {
return __method.apply(object, [event || window.event]);
}
}
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments;
if (typeof element == 'string')
element = document.getElementById(element);
if (arguments.length == 1)
return element;
elements[elements.length] = element;
}
return elements;
}
if (!Function.prototype.apply) {
Function.prototype.apply = function(object, parameters) {
var parameterStrings = new Array();
if (!object) object = window;
if (!parameters) parameters = new Array();
for (var i = 0; i < parameters.length; i++)
parameterStrings = 'parameters[' + i + ']';
object.__apply__ = this;
var result = eval('object.__apply__(' +
parameterStrings.join(', ') + ')');
object.__apply__ = null;
return result;
}
}
Search Customer Reviews (What's this?)
9 of 10 people found the following review helpful:
A great book that fills the gap, September 20, 2004
Reviewer: Dan "munifreak" (Pittsburgh, PA) - See all my reviews
As a doctoral student in Finance, I use Matlab a lot for modeling and computation. I had been searching for a reference book that can help me build simulation models using SIMULINK. But the only books available are in specialized fields such as physics or engineering. Patrick Anderson's book attract me immediately by its title. A combination of MATLAB, SIMULATION, GIS and Economics-- that's exactly what I was looking for. It managed to keep up with my high expectation with its highly informative content. The examples given were very well selected and close to application, corresponding Matlab code were neat. It kept surprising me with bonus tricks in using MATLAB(such as getting yahoo stock time seres directly using Matlab, creating XML files), which themselves are well worth the price. I recommend this book to researchers or analysts who want to stand at the frontier of business evaluation, and those who want to exploit the power of Matlab in business forecasting.
Was this review helpful to you?
(Report this)
4 of 4 people found the following review helpful:
Guide to multifaceted simulation analysis, August 29, 2004
Reviewer: V. Hlasny - See all my reviews
This book appeals to me for several reasons. It discusses sophisticated methods of valuing business enterprises, and critiques competing models with a matter-of-course approach. The reader is given the perspective and reference to related work. Pitfalls of prejudiced and lackadaisical estimation are shown with neat examples.
On the technical side, experienced MatLab users find good ready-to-implement tools, code segments, and references in the book. The book encourages the use of simulation analysis, and brings it down from its pedestal to business-management level as part of a standard business-planning procedure. Given the traditional disregard for detailed GIS data (springing from the absence of software and expertise), this book also brings up the role of multifaceted geography in business performance and strategy. While not a textbook in GIS methods, it fills a gap in reference literature and shows how loaded the concepts are.
Was this review helpful to you?
(Report this)
3 of 4 people found the following review helpful:
Excellent instruction and reference , August 16, 2004
Reviewer: Econ PhD Student (Cornell University) - See all my reviews
Anderson's book is equal parts course and reference guide for using Matlab and simulation models for business and economic analysis. It offers material for both those who have a strong understanding of the programs (though may be relatively new to economic, financial, or market analysis), and those who are just getting started with the program.
The book's greatest strength is the material on Matlab and simulation modeling, combined with the insight the author provides from his extensive experience as a consultant and industry economist.
It should be noted that this book is not an extensive guide to Geographic Information Systems (GIS). Although the book provides many helpful examples, and advice on incorporating GIS into business and economic analyses, this is not its emphasis. However, what it lacks in instruction in the area of GIS, it more than makes up for in its other content.
In all, this book is highly recommended. It provides fantastic instruction and reference in using Matlab and simulation modeling tools for business and economic analysis.
Was this review helpful to you?
(Report this)
6 of 6 people found the following review helpful:
Great book for business economists, August 6, 2004
Reviewer: I. K. Geckil - See all my reviews
Most of the applied economic and finance books using a complicated software are very technical and not practical at all. Even though Anderson's book is very technical, it is very practical for business economics. Anderson's book is well-written and sophisticated but easy-to-read and follow. As a MATLAB user, I think this book is very helpful and user-friendly. Anderson provides many real-life examples from his work engagements. This will be one of the pillar books in every business economists' library.
Was this review helpful to you?
[此贴子已经被angelboy于2008-7-25 10:26:35编辑过]
扫码加好友,拉您进群



收藏
