<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/most_recent_feed</link>
    <title>MATLAB Central Newsreader Recent Posts</title>
    <description>Most Recent Posts</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/mathworks/zAHF" /><feedburner:info uri="mathworks/zahf" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <pubDate>Wed, 23 May 2012 00:35:07 -0400</pubDate>
      <title>Re: Variance signal processing</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/rHfCdp4xO4c/320318</link>
      <author>Star Strider</author>
      <description>"Rik" wrote in message &amp;lt;jph07j$bn9$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hey,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am quite new with the Matlab environment but here is my problem which I am struggling with for a couple of days. I have collected sensor data that is stored in an array newData.data which is 20000x16 (16 sensors in total and a lot of data readings)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I want to analyse the variance of each sensor, if the variance exceeds a certain threshold then counter++. At the end the counter shows the amount of peaks that exceeded the threshold.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This is how far I got:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; windowStDev = nan(1,16);&lt;br&gt;
&amp;gt; windowVariance = nan(1,16);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for i = 1:16;&lt;br&gt;
&amp;gt; windowStDev(i) = stdfilt(newData.data(1:1000,i), true(1,701));&lt;br&gt;
&amp;gt; windowVariance(i) = windowStDev(i) .^ 2;&lt;br&gt;
&amp;gt; end;&lt;br&gt;
&amp;gt; &lt;br&gt;
. . .&lt;br&gt;
&amp;gt; So in this example I only plotted value 1-1000 to prevent waiting and such. Well I am able to plot all the raw sensor readings but I can only plot 1 variance. Therefore I thought lets create a for loop to create a variance array which wont work. And I have really no clue.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Could someone help me? Thank you in advance!&lt;br&gt;
&lt;br&gt;
-------------------------------------------------------------------&lt;br&gt;
&amp;nbsp;I don’t understand why you’re using ‘stdfilt’, since it doesn't seem you're not doing image processing.  I suggest perhaps eliminating the ‘for’ loop and substituing: &lt;br&gt;
&lt;br&gt;
DataVar = var(newData.data, 0, 1);  &lt;br&gt;
&lt;br&gt;
This will produce a 1x16 vector of the variances of the 16 columns of your array.  I suggest you read the ‘Help’ sections for ‘mean’ ‘var’ and ‘std’.  &lt;br&gt;
&lt;br&gt;
To determine the sensor values that exceed a given threshhold variance, I suggest the ‘find’ function.  &lt;br&gt;
&lt;br&gt;
I also don’t understand why you're using the variance as a threshold value rather than perhaps the upper 95 per cent confidence interval given as: &lt;br&gt;
&lt;br&gt;
CI95 = mean(Data.data)+1.96*std(Data.data, 0, 1);  &lt;br&gt;
&lt;br&gt;
The variance has units of Data^2, while the mean and std have the same units as Data, so if you‘re measuring voltage, with the variance you’re comparing normalised power (variance) with voltage; if distance, normalised area (variance) to linear measure, etc.  If you want other than 95 per cent confidence intervals, see ‘erfcinv’.  If you have the Statistics Toolbox, then you want ‘norminv’ and the other related functions it has available.&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/rHfCdp4xO4c" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320318#877637</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 23:45:06 -0400</pubDate>
      <title>Re: maksimum box (rectangle) inside an irregular polygon</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/wfDmJuESh-g/136084</link>
      <author>kamal </author>
      <description>Hi, Could you find any solution for that?&lt;br&gt;
I am looking for the same problem. &lt;br&gt;
I appreciate if you can let me know about that.&lt;br&gt;
&lt;br&gt;
"Frank Nielsen" &amp;lt;frank230458@yahoo.dk&amp;gt; wrote in message &amp;lt;ef4615d.-1@webcrossing.raydaftYaTP&amp;gt;...&lt;br&gt;
&amp;gt; I have apolygon described as a contour set of coordinates, x &amp; y.&lt;br&gt;
&amp;gt; This contour is an irregular shape with several perforations more or&lt;br&gt;
&amp;gt; less evenly distrubeted around the whole perimeter (imagine a stamp).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I need to find the optimal regular rectangle who can fit just exactly&lt;br&gt;
&amp;gt; inside this irregular polygon.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hope to hear from somebody.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks in advance.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Frank Nielsen&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/wfDmJuESh-g" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/136084#877636</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 23:33:09 -0400</pubDate>
      <title>Re: How to Import / Parsing CSV file with mixed data types in Matlab</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/DwblE49pnwQ/320303</link>
      <author>Casper </author>
      <description>You cant use csv for this.&lt;br&gt;
&lt;br&gt;
I assume, since you do not write it, that you want to split your string on the semi-colon ';'. There are several options for this depending on the characterisitics of your data. &lt;br&gt;
&lt;br&gt;
1) If all your data is identical to "Patrol7;/NT_CPU/CPU_0/CPUprcrInterruptsPerSec;04/04/2012;11:04:46;77" &lt;br&gt;
that is, a string where entries are separated by 5 semi-colons, I suggest you try to read your file using dlmread ('doc dlmread') which is a more general version of csvread where you can identify your own delimeter; in this case ';'.&lt;br&gt;
&lt;br&gt;
If your data is not uniform (that is some string contain more semi-colons or other delimeters), I suggest you look into regexp. Simply put given the string:&lt;br&gt;
&amp;gt;&amp;gt; str = 'Patrol7;/NT_CPU/CPU_0/CPUprcrInterruptsPerSec;04/04/2012;11:04:46;77';&lt;br&gt;
&amp;gt;&amp;gt; res = regexp(str, ';', 'split');&lt;br&gt;
returns a 1 x 5 cell array containing:&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt;  'Patrol7'    '/NT_CPU/CPU_0/CPUprcrInterruptsPerSec'    '04/04/2012'    '11:04:46'    '77'&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/DwblE49pnwQ" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320303#877635</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 23:25:18 -0400</pubDate>
      <title>Re: Discrete time Fourier transform</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/gr_JQg4ubwQ/320308</link>
      <author>Greg Heath</author>
      <description>On May 22, 7:03&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/gr_JQg4ubwQ" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320308#877634</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 23:03:04 -0400</pubDate>
      <title>Re: Discrete time Fourier transform</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/bNxJb_3cDfs/320308</link>
      <author>Greg Heath</author>
      <description>On May 22, 12:16&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/bNxJb_3cDfs" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320308#877633</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 22:05:06 -0400</pubDate>
      <title>Re: Max distance from point on ellipsoid to surface</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/OWBoG_AB-sU/320310</link>
      <author>stefaneli </author>
      <description>Finding a tangent plane and normal line isn't in my formulation of the problem. I wanted to be sure, that I've understood you well.&lt;br&gt;
I was thinking about that problem also, but in my opinion after some point of the surface, orthogonallity conditions would no longer hold, so it doesn't matter if surface goes to infinity.&lt;br&gt;
&lt;br&gt;
"Roger Stafford" wrote in message &amp;lt;jpgsfi$okp$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "stefaneli" wrote in message &amp;lt;jpgpt3$c6s$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; My surface is determined by a mathematical equation 3x+4y^2+6z+6=0. So basically I need to find tangent plane and normal line(to that tangent plane) at each point of surface and see if that normal line (extended) orthogonally intersects  tangent plane of ellipsoid at any point. And Lagrange multipliers would lead this? I'm not sure if I got it right. Thanks.&lt;br&gt;
&amp;gt; - - - - - - - -&lt;br&gt;
&amp;gt;   Well, I am saying that if you were to use the method of Lagrange multipliers, they would eventually lead to the conditions you have stated, but since you are able to state them already, there is no need to go through all the work of applying Lagrange multipliers.  You're already past that in your formulation of the problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   Now what you have to do is translate your orthogonality conditions into two more equations and then solve the three equations for all possible solutions.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   I see a problem however in your particular surface.  You will probably get solutions to the above equations.  However the surface extends infinitely far out since it is a cylindrical projection of a parabola.  The only maximum distance you could attain would have to occur on some finite boundary of that paraboloid, where the above orthogonality conditions would no longer hold.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   In other words, there is an aspect of your problem that I don't understand for that surface.  Perhaps you could enlighten me.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Roger Stafford&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/OWBoG_AB-sU" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320310#877632</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 21:25:07 -0400</pubDate>
      <title>Variance signal processing</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/e3GlsnRj5q4/320318</link>
      <author>Rik </author>
      <description>Hey,&lt;br&gt;
&lt;br&gt;
I am quite new with the Matlab environment but here is my problem which I am struggling with for a couple of days. I have collected sensor data that is stored in an array newData.data which is 20000x16 (16 sensors in total and a lot of data readings)&lt;br&gt;
&lt;br&gt;
I want to analyse the variance of each sensor, if the variance exceeds a certain threshold then counter++. At the end the counter shows the amount of peaks that exceeded the threshold.&lt;br&gt;
&lt;br&gt;
This is how far I got:&lt;br&gt;
&lt;br&gt;
windowStDev = nan(1,16);&lt;br&gt;
windowVariance = nan(1,16);&lt;br&gt;
&lt;br&gt;
for i = 1:16;&lt;br&gt;
windowStDev(i) = stdfilt(newData.data(1:1000,i), true(1,701));&lt;br&gt;
windowVariance(i) = windowStDev(i) .^ 2;&lt;br&gt;
end;&lt;br&gt;
&lt;br&gt;
% Plot them&lt;br&gt;
subplot(2,1,1);&lt;br&gt;
plot(newData.data(1:1000,:));&lt;br&gt;
title('Original Data');&lt;br&gt;
subplot(2,1,2);&lt;br&gt;
&lt;br&gt;
plot(windowVariance);&lt;br&gt;
title('Variance of Original Data');&lt;br&gt;
set(gcf, 'Position', get(0,'Screensize'));&lt;br&gt;
&lt;br&gt;
So in this example I only plotted value 1-1000 to prevent waiting and such. Well I am able to plot all the raw sensor readings but I can only plot 1 variance. Therefore I thought lets create a for loop to create a variance array which wont work. And I have really no clue.&lt;br&gt;
&lt;br&gt;
Could someone help me? Thank you in advance!&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/e3GlsnRj5q4" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320318#877631</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 20:28:05 -0400</pubDate>
      <title>Re: zeros flaw</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/TUAHEtr-epk/320284</link>
      <author>Matt J </author>
      <description>"James Tursa" wrote in message &amp;lt;jpgrp3$kt3$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; My typical workaround for this has been to put in the class doc that the way to call these types of functions is to use the classname itself instead of a character string with the classname, e.g.,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; z = zeros(1,2,hpf) ! Note the absence of the quotes around hpf&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This forces MATLAB to call your overloaded function. Same goes for other functions like this such as ones, eye, etc.&lt;br&gt;
==========&lt;br&gt;
&lt;br&gt;
That would be a good solution if it worked for built-in classes as well, but since it doesn't, it suffers from the same limitations as my static method proposal.&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/TUAHEtr-epk" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320284#877629</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 20:26:43 -0400</pubDate>
      <title>Re: Random Integers with unequal chance</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/wZSprNECLxY/320309</link>
      <author>ImageAnalyst</author>
      <description>In general, for some arbitrary function, follow these directions:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://en.wikipedia.org/wiki/Inverse_transform_sampling"&gt;http://en.wikipedia.org/wiki/Inverse_transform_sampling&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
(It might have been Roger that first told me about that link long ago.)&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/wZSprNECLxY" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320309#877630</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 20:26:05 -0400</pubDate>
      <title>Re: zeros flaw</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/oK0qg2UwNu8/320284</link>
      <author>Matt J </author>
      <description>"John D'Errico" &amp;lt;woodchips@rochester.rr.com&amp;gt; wrote in message &amp;lt;jpgqfq$esb$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If the given class constructor cannot take 0 as a case,&lt;br&gt;
&amp;gt; then it really is not a numeric class anyway.&lt;br&gt;
==============&lt;br&gt;
&lt;br&gt;
Yes, but ZEROS wouldn't be able to use ISNUMERIC to detect that in advance.&lt;br&gt;
It would have to first attempt the classname(0) constructor call first and then endure the class-dependent, user-defined error behavior that followed. &lt;br&gt;
&lt;br&gt;
At minimum this would require a clumsy (IMO) try/catch.&lt;br&gt;
&lt;br&gt;
It also throws into question why overloading ISNUMERIC  here is meaningful. If ZEROS doesn't survive the call to classname(0), the try/catch will handle it independently of ISNUMERIC. If it does survive the call, then why not go ahead and repmat the result regardless of what ISNUMERIC has to say?&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/oK0qg2UwNu8" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320284#877628</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 20:21:06 -0400</pubDate>
      <title>Re: Max distance from point on ellipsoid to surface</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/dTI1ayd91_s/320310</link>
      <author>Roger Stafford</author>
      <description>"stefaneli" wrote in message &amp;lt;jpgpt3$c6s$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; My surface is determined by a mathematical equation 3x+4y^2+6z+6=0. So basically I need to find tangent plane and normal line(to that tangent plane) at each point of surface and see if that normal line (extended) orthogonally intersects  tangent plane of ellipsoid at any point. And Lagrange multipliers would lead this? I'm not sure if I got it right. Thanks.&lt;br&gt;
- - - - - - - -&lt;br&gt;
&amp;nbsp;&amp;nbsp;Well, I am saying that if you were to use the method of Lagrange multipliers, they would eventually lead to the conditions you have stated, but since you are able to state them already, there is no need to go through all the work of applying Lagrange multipliers.  You're already past that in your formulation of the problem.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Now what you have to do is translate your orthogonality conditions into two more equations and then solve the three equations for all possible solutions.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;I see a problem however in your particular surface.  You will probably get solutions to the above equations.  However the surface extends infinitely far out since it is a cylindrical projection of a parabola.  The only maximum distance you could attain would have to occur on some finite boundary of that paraboloid, where the above orthogonality conditions would no longer hold.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;In other words, there is an aspect of your problem that I don't understand for that surface.  Perhaps you could enlighten me.&lt;br&gt;
&lt;br&gt;
Roger Stafford&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/dTI1ayd91_s" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320310#877627</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 20:13:07 -0400</pubDate>
      <title>Re: Max distance from point on ellipsoid to surface</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/SJ07h9XRCaQ/320310</link>
      <author>James Tursa</author>
      <description>"stefaneli" wrote in message &amp;lt;jpgh3q$c1$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I want to find a point on an given ellipsoid that is the farthest from a given surface. (The distance between a point on ellipsoid and the surface should be max). So how can I do this? I was thinking about some kind of Lagrange multipliers. But what do you think? Thanks.&lt;br&gt;
&lt;br&gt;
Another way is to brute force it. Write functions to parametrically descibe each surface, define a function to calculate the distance between surface points on each surface (or the negative of this if you are looking for max distance), and then pass a function handle to this function and a starting guess to fminsearch.&lt;br&gt;
&lt;br&gt;
James Tursa&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/SJ07h9XRCaQ" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320310#877626</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 20:09:07 -0400</pubDate>
      <title>Re: zeros flaw</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/WS4DXh0ZnP8/320284</link>
      <author>James Tursa</author>
      <description>"John D'Errico" &amp;lt;woodchips@rochester.rr.com&amp;gt; wrote in message &amp;lt;jpe976$4ko$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; In playing with HPF class, a user tripped over an interesting problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; According to the help for zeros, one can use zeros to create a&lt;br&gt;
&amp;gt; variable that is entirely zero, but with a given numeric class.&lt;br&gt;
&amp;gt; For example, if you try this...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; z = zeros(1,2,'uint8')&lt;br&gt;
&amp;gt; z =&lt;br&gt;
&amp;gt;     0    0&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; class(z)&lt;br&gt;
&amp;gt; ans =&lt;br&gt;
&amp;gt; uint8&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Indeed z is a zero of class uint8. Try it with HPF though.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; z = zeros(1,2,'hpf')&lt;br&gt;
&amp;gt; Error using zeros&lt;br&gt;
&amp;gt; Trailing string input must be a valid numeric class name. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; So MATLAB does not recognize HPF as a numeric class, even&lt;br&gt;
&amp;gt; though isnumeric is properly defined to return a true value for&lt;br&gt;
&amp;gt; a HPF number.&lt;br&gt;
&lt;br&gt;
My typical workaround for this has been to put in the class doc that the way to call these types of functions is to use the classname itself instead of a character string with the classname, e.g.,&lt;br&gt;
&lt;br&gt;
z = zeros(1,2,hpf) ! Note the absence of the quotes around hpf&lt;br&gt;
&lt;br&gt;
This forces MATLAB to call your overloaded function. Same goes for other functions like this such as ones, eye, etc.&lt;br&gt;
&lt;br&gt;
James Tursa&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/WS4DXh0ZnP8" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320284#877625</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 19:56:07 -0400</pubDate>
      <title>Re: Random Integers with unequal chance</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/hRpp5HY8Y1g/320309</link>
      <author>Roger Stafford</author>
      <description>"Nick" wrote in message &amp;lt;jpgebn$gqe$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; So I would like the generator to have a 50% chance of giving a 1, 25% chance of giving a 2, 12.5% chance of giving a 3 and so on.&lt;br&gt;
- - - - - - - - - - - -&lt;br&gt;
&amp;nbsp;x = floor(-log(rand(n,1)/2)/log(2));&lt;br&gt;
&lt;br&gt;
Roger Stafford&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/hRpp5HY8Y1g" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320309#877624</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 22 May 2012 19:47:06 -0400</pubDate>
      <title>Re: zeros flaw</title>
      <link>http://feedproxy.google.com/~r/mathworks/zAHF/~3/Yrr8aBXeqzw/320284</link>
      <author>John D'Errico</author>
      <description>"Matt J" wrote in message &amp;lt;jpgojr$5vp$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "John D'Errico" &amp;lt;woodchips@rochester.rr.com&amp;gt; wrote in message &amp;lt;jpfleq$qkt$1@newscl01ah.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;The point is,&lt;br&gt;
&amp;gt; &amp;gt; that tools like cast and zeros should be friendly, certainly&lt;br&gt;
&amp;gt; &amp;gt; cast. &lt;br&gt;
&amp;gt; ==============&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; You could (and probably should) overload CAST yourself for the purposes of your class.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;When TMW supplies tools like isnumeric, TMW&lt;br&gt;
&amp;gt; &amp;gt; should use those same tools to verify that a variable IS&lt;br&gt;
&amp;gt; &amp;gt; a numeric class, not merely one of the numeric classes&lt;br&gt;
&amp;gt; &amp;gt; they alone provide.&lt;br&gt;
&amp;gt; ============&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; IMO, it's debatable whether this is the intended use of ISNUMERIC. Remember, ISNUMERIC, even when used with builtin MATLAB classes, cannot take  a class' name as input. It needs an instance of the class. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; To get your approach to work, you want ZEROS to do this internally&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; isnumeric(classname(0))&lt;br&gt;
&lt;br&gt;
Yes. It wants to do so anyway, since zeros could then&lt;br&gt;
simply be repmat applied to classname(0).&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; but that presumes that the given class constructor can accept 0 (or any other numeric value) as input in the first place. Classes that don't obey this convention will produce a  error. ZEROS could work around this by using some kind of try/catch, but that's already as kludgey, I'd say, as 0*A.&lt;br&gt;
&lt;br&gt;
If the given class constructor cannot take 0 as a case,&lt;br&gt;
then it really is not a numeric class anyway.&lt;br&gt;
&lt;br&gt;
Likewise, this is how ones and eye would work too.&lt;br&gt;
For eye, it creates classname(1) and classname(0).&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; It's also not clear to me how built-in compiled code like ZEROS would construct an object of a user-defined class. How does it know how much memory to allocate for it? &lt;br&gt;
&lt;br&gt;
For a non-standard class, just bounce it out to an m-file&lt;br&gt;
for the operation, letting matlab do the work.&lt;br&gt;
&lt;br&gt;
The objective is not immense speed here from compiled&lt;br&gt;
code, but a consistent interface that treats a numeric&lt;br&gt;
class as a numeric class.&lt;br&gt;
&lt;br&gt;
John&lt;img src="http://feeds.feedburner.com/~r/mathworks/zAHF/~4/Yrr8aBXeqzw" height="1" width="1"/&gt;</description>
    <feedburner:origLink>http://www.mathworks.com/matlabcentral/newsreader/view_thread/320284#877623</feedburner:origLink></item>
  </channel>
</rss>

