Rank: 10716 based on 0 downloads (last 30 days) and 0 file submitted



Personal Profile:


Watch this Author's files


Comments and Ratings by John View all
Updated File Comments Rating
24 May 2012 polyfitZero Fit polynomial to data, forcing y-intercept to zero or arb. value and slope to zero or arb. value Author: Mark Mikofski

I wonder if you could modify the routine so that higher powers could also be forced to be zero. For example, the current routine set the constant coefficient to zero. But, can the 1st order coefficient also be forced to be zero. And so on...

04 Jan 2012 Rational Polynomial curve fitting Fits a function to a quotient of polynomials Author: Paul Godfrey

Great job, and good examples.

A couple of modifications that could be implemented.

Let there be one input, the order of the denominator, and accept an array. Calculate rms error and return that for the array. Could either set the numerator to the denominator, or sweep the numerator from 2 to the order of the denominator.

Incorporate a lag term, including raising the exponent to a power.

In your examples, you may want to include extracting the polynomial from a psd, generating a time history from a filter on rand, and replotting the resulting psd for comparison.

27 Dec 2011 Generate maximally perceptually-distinct colors Choose a set of n colors that can be readily distinguished from each other Author: Tim Holy

Thank you for writinig this, it does generate an interesting set of colors that do appear to be contrasting. Would it be possible to generate one, or more, "key" colors that are highly contasted with the rest. I have about 30 lines on a figure, along with the average. While I did make the average wider, it is difficult to determine the color for the "key" line(s) using this routine.

01 Sep 2011 2D Histogram Calculation Quick computation of two-dimensional histogram of bivariate data Author: Laszlo Balkay

I'm having trouble with this routine. In the example below, the x and y ranges dont' seem to be correct, and also the distribution doesn't look right either.

function hist3_test
close all; clc;
events = 1000000;
x=[]; y=[];
for xx=0:.1:1
if (xx<.3)
ys=cos(xs)+ sqrt(0.001)*randn(round(events/nxs),1);
ys=cos(xs)+ sqrt(0.1)*randn(round(events/nxs),1);
x = [x; xs];
y = [y; ys];

% For linearly spaced edges:
xedges = linspace(-1,1,64); yedges = linspace(-1,1,64);
histmat = hist2(x, y, xedges, yedges);
% pcolor(xedges,yedges,histmat'); colorbar ; axis square tight ;

izero = histmat==0;
histmat(izero) = nan;
h=pcolor(xedges,yedges,histmat'); colorbar ; axis square tight ;

01 Sep 2011 2D Histogram Calculation Quick computation of two-dimensional histogram of bivariate data Author: Laszlo Balkay

A surface can be created using


Contact us