<?xml version="1.0" encoding="UTF-8"?>
<rss 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-2010 by The 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>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 09 Feb 2010 23:01:08 -0500</pubDate>
      <title>Re: Obtaining Coordinates From Screen</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272198#715532</link>
      <author>Jane </author>
      <description>Hi, I am not too such about your comment but I understand your meaning. Now lets define the problem slightly differently. You have a list of xyz coordinate information for many points. First you plot these points onto the screen. &lt;br&gt;
&lt;br&gt;
Datacursor is a tool which can recieve these xyz coordinates back by selection and write them to the screen in an information box. Therefore it must be possible to write a program to retrieve this information but store the information in a matrix instead of writing it to an information box. I think i did however see a slight rounding in the coordinate information when clicking on the screen using this function. I am not sure if you can get it to display "format long g" etc.&lt;br&gt;
&lt;br&gt;
It could be that the program written will snap to the closest point where clicked on the screen this would be great. And disable the back points. this can be done with the actual depth information even though it is displayed in 2D? I hope this is clear.&lt;br&gt;
What I really want to know is if Ginput can be used to retrieve points on a screen as i think what is needed is the reverse of Ginput. There must be an internal function that accesses the screen. If someone can explain that function it could be used directly?&lt;br&gt;
&lt;br&gt;
Thank you.</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:59:05 -0500</pubDate>
      <title>Add a number tag to the end of a character text file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272455#715531</link>
      <author>Nhan Nguyen</author>
      <description>first .m file:&lt;br&gt;
fid=fopen('Project1.txt');&lt;br&gt;
c=fread(fid,'*char');&lt;br&gt;
x=round(length(c)/5)&lt;br&gt;
&lt;br&gt;
c1=c(1:966);&lt;br&gt;
&lt;br&gt;
fid1=fopen('file1.txt', 'w');&lt;br&gt;
fwrite(fid1,c1,'char');&lt;br&gt;
&lt;br&gt;
fclose(fid);&lt;br&gt;
fclose(fid1);&lt;br&gt;
&lt;br&gt;
second .m file:&lt;br&gt;
fid1=fopen('file1.txt');&lt;br&gt;
tag1=fread(fid1, '*char');&lt;br&gt;
fclose(fid1);&lt;br&gt;
&lt;br&gt;
I want to spit a text file into any number of files and add a tag (1,2,3,4,etc.) at the end of each spitted files and then reassemble them in any order by reading the tag at the end of those file. I need to do this in two .m file (shown above). I got the spitting part, but I can not figure how to add an integer to a file full of character and to get the second file should read each tag at the end. Please help, I got two days for this.</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:53:04 -0500</pubDate>
      <title>Re: Constraint System of Linear Eq.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272448#715530</link>
      <author>John D'Errico</author>
      <description>"Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &amp;lt;hksm0q$rca$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "cgs Spindler" &amp;lt;christian-spindler@gmx.de&amp;gt; wrote in message &amp;lt;hksitv$ac8$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi folkes,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I've got to solve the linear system AX=B with all three A, X and B being matrices. As constraints, there are equations x_ij + x_kl = 1 for some of the elements of X. Altogether, the system is overdetermined (i.e., columns of A are time series with ~180 time steps, rows of A are 24 parameters, to be mapped down at 4 parameters in B).&lt;br&gt;
&amp;gt; ================&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Why not use quadprog() to do find a constrained least squares solution?&lt;br&gt;
&lt;br&gt;
lsqlin is far easier to use in this sense, since it takes&lt;br&gt;
the problem in the form of A*x = b, without needing&lt;br&gt;
to reformulate it into the quadprog form.&lt;br&gt;
&lt;br&gt;
As far as entering it into matlab, you need to formulate&lt;br&gt;
the problem in the form of&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;A*X = b&lt;br&gt;
&lt;br&gt;
where X and B are (column) vectors. This is the standard&lt;br&gt;
form that lsqlin will require.&lt;br&gt;
&lt;br&gt;
John</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:52:02 -0500</pubDate>
      <title>Re: setting the matrix elements to zero when...</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272319#715529</link>
      <author>SM </author>
      <description>Hey Guys,&lt;br&gt;
I've got stuck again! What if, there is an NaN element in the matrix? </description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:39:03 -0500</pubDate>
      <title>Re: Sum Matrix Subset</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272454#715528</link>
      <author>ade77 </author>
      <description>"Daniel Blackmer" &amp;lt;daniel.blackmer@remove.thisgmail.dotcom&amp;gt; wrote in message &amp;lt;hksmc4$jv2$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "Daniel Blackmer" &amp;lt;daniel.blackmer@remove.thisgmail.dotcom&amp;gt; wrote in message &amp;lt;hkslll$5h9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; I have a sparse matrix which can get VERY large which I need to sum row subsets of, and I need it done with no for loops. As an example:&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Create a new matrix which is defined by the sum of a finite number of column elements in input matrix &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; [1   2   3;&lt;br&gt;
&amp;gt; &amp;gt;  4   5   6;         -----would become -------&amp;gt;    [5    7   9;&lt;br&gt;
&amp;gt; &amp;gt;  7   8   9;                                                 17  19  21]&lt;br&gt;
&amp;gt; &amp;gt; 10 11 12]   &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; In this case I am just summing the columns of the two rows, and making that my first row, and then summing the bottom two rows and making that my second row. Its a simple example, however in practice this is dealing with such massive sparse matrices that solutions even involving the full() command will run my 12G of ram out in a fraction of a second. I have tried reshaping this into a N dimensional matrix where each subset is put into a third dimension, (which could work fine) except that there is no way to make a sparse matrix N dimensional, it must be 2 dimensional, and as I said it will crash the computer to remove the sparsity. &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I know that I said it before, but I will say it again: I cannot use for loops. So many values last time I tried it changed my execution time from .56 seconds to 350 seconds.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Any help anyone can provide here would be greatly appreciated!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Darnit. When posted it messed up my example. Just to clarify:&lt;br&gt;
&amp;gt; Input = [1 2 3; 4 5 6; 7 8 9; 10 11 12]; &lt;br&gt;
&amp;gt; Output = [5 7 9; 17 19 21];&lt;br&gt;
&lt;br&gt;
For your specific example:&lt;br&gt;
a = reshape(Input,2,[]);&lt;br&gt;
b = sum(a);&lt;br&gt;
Output = reshape(b,2,[]);</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:32:04 -0500</pubDate>
      <title>Re: Neural network toolbox acting weird?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272451#715526</link>
      <author>George Burdell</author>
      <description>"Daniel Blackmer" &amp;lt;daniel.blackmer@remove.thisgmail.dotcom&amp;gt; wrote in message &amp;lt;hksm8b$cpe$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If you want your output values to be between 0 and 1 you should set your target vector to -1. Dont forget that logsig(0) = .5 That is evaluating itself correctly for what you have supplied it with. I got quite confused by this too!&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
Thanks for your help. So the target vectors I provide to "train" must be values "before" the output transfer function (logsig)? Why doesn't it just let you supply the "final" values? And why specifically "-1"? Why not -2, -3, -100, etc.? logsig would evaluate to 0 for those values too.</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:29:27 -0500</pubDate>
      <title>Re: Need to make code more Efficient</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272393#715527</link>
      <author>Walter Roberson</author>
      <description>Fraser Dickson wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;            for counter = 1:kd&lt;br&gt;
&amp;gt;                r1(counter) = temp_array((d_under_test + cd  +counter &lt;br&gt;
&amp;gt; ),(r_under_test));&lt;br&gt;
&amp;gt;            end&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;            for counter = 1:kd&lt;br&gt;
&amp;gt;                r2(counter) = temp_array((d_under_test - cd  -counter &lt;br&gt;
&amp;gt; ),(r_under_test));&lt;br&gt;
&amp;gt;            end&lt;br&gt;
&lt;br&gt;
r2_r1 = temp_array(d_under_test - cd - kd : ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d_under_test + cd + kd, ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;r_under_test);&lt;br&gt;
r2mean = mean(r2_r1(1:kd));&lt;br&gt;
r1mean = mean(r2_rw(end-kd-1:end));&lt;br&gt;
average(x,y) = (r1mean + r2mean) / 2;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Note: because kr and cr do not vary according to y, you can vectorize to do an &lt;br&gt;
entire column at one time.&lt;br&gt;
&lt;br&gt;
Also note that you could move the initialization of d_under_test to outside of &lt;br&gt;
the 'for y' loop.&lt;br&gt;
&lt;br&gt;
&amp;gt;            r2mean = mean(r2);&lt;br&gt;
&amp;gt;            r1mean = mean(r1);&lt;br&gt;
&amp;gt;            average(x,y) = 0.5*(r1mean+r2mean);&lt;br&gt;
&amp;gt;     end&lt;br&gt;
&amp;gt;    end</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:28:04 -0500</pubDate>
      <title>Re: Identifying workspaces</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272368#715525</link>
      <author>Matt J </author>
      <description>"Cygnine " &amp;lt;cygnine@remove.this.gmail.com&amp;gt; wrote in message &amp;lt;hks195$fpc$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; To solve this, I've created a class FunctionNode, and each instance of FunctionNode corresponds to an m-file in a package. Now I've overloaded subsref for this object so that using function calling syntax, i.e. f(blah1, blah2), works exactly the same way as a function handle. However, going through Matlab's internal processing structure of overloading subsref appears to take a considerable amount of time (and my codes call lots of FunctionNodes multiple times). &lt;br&gt;
===================&lt;br&gt;
&lt;br&gt;
Even if that is true, by the way, it probably only means you are committing the classic MATLAB sin of trying to do a for-loop over computations that are better off being vectorized. For the overhead of going through subsref to be significant, the rest of the computations done by a single call to f(blah1,blah2) would have to be lightning fast. But we never do a loop over lightning fast function calls in MATLAB. We make one function call in a vectorized way.&lt;br&gt;
&lt;br&gt;
Consider the following class, for example, which is essentially a subsref-driven function handle to the sin() function&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
classdef  myClass &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;methods&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;function out=subsref(ob,S) &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out=sin(S.subs{:});&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Now take the data&lt;br&gt;
&lt;br&gt;
X=rand(3000);&lt;br&gt;
FancyHandle=myClass;&lt;br&gt;
&lt;br&gt;
and compare the following timings. Essentially, there's no difference.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; clear z, tic; z=sin(x);toc&lt;br&gt;
Elapsed time is 0.287017 seconds.&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; clear z, tic; z=FancyHandle(x);toc&lt;br&gt;
Elapsed time is 0.261119 seconds.</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:26:02 -0500</pubDate>
      <title>Re: sigTOOL: Timestamps from wave_clus inconsistency</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272422#715523</link>
      <author>Mario </author>
      <description>Dear Malcolm,&lt;br&gt;
&lt;br&gt;
Thanks for letting me know.&lt;br&gt;
&lt;br&gt;
Another question, about further communications regarding sigTOOL:&lt;br&gt;
&lt;br&gt;
I just registered my copy, and wondered what is the preferred method: should the communication from now on proceed through the sigtool email, or here at the matlab newsreader?&lt;br&gt;
&lt;br&gt;
Mario.&lt;br&gt;
&lt;br&gt;
"Malcolm Lidierth" &amp;lt;ku.ca.lck@htreidil.mloclam&amp;gt; wrote in message &amp;lt;hks74k$sqq$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Mario&lt;br&gt;
&amp;gt; This issue was fixed recently. Download the latest version of sigTOOL from &lt;a href="http://sourceforge.net/projects/sigtool/"&gt;http://sourceforge.net/projects/sigtool/&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The spike times were correct before but were always expressed in microseconds which might cause problems if you combined original data channels and wave_clus outputs in a single analysis.&lt;br&gt;
&amp;gt; ML</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:25:06 -0500</pubDate>
      <title>Re: Labelling with text (names) the contour lines in contour</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272415#715522</link>
      <author>Rich Ellis</author>
      <description>Try using the CLABEL function to get the text object handles and then set &lt;br&gt;
the text object "String" property to the text you want. Something like this:&lt;br&gt;
&lt;br&gt;
[C,h] = contour(peaks(20),3);&lt;br&gt;
th = clabel(C,h);&lt;br&gt;
set(findobj(th,'String','0.59778'),'String','Base Line')&lt;br&gt;
&lt;br&gt;
where '0.59778' is the numeric label of the line whose label you want to &lt;br&gt;
change and 'Base Line' is the label you want that line to use.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
"Sabrina Speich" &amp;lt;speich@univ-brest.fr&amp;gt; wrote in message &lt;br&gt;
news:hkrt7p$oi9$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I would like to know if there is a solution to label the contour lines &lt;br&gt;
&amp;gt; with names (hence text strings) I would like tu use instead of numbers.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there any solution for this ? I am not able to find it in the Matlab &lt;br&gt;
&amp;gt; Manual or newsletters etc&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thank you for helping me with this.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Best regards,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Sabrina&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:13:55 -0500</pubDate>
      <title>Re: File browser from popup menu</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272450#715524</link>
      <author>Walter Roberson</author>
      <description>Walter wrote:&lt;br&gt;
&amp;gt; Can a GUI popup menu be configured to create a file browser?&lt;br&gt;
&lt;br&gt;
I don't see why not. You could use one element of Userdata to keep track of &lt;br&gt;
the current path, and another element of Userdata to keep track of which of &lt;br&gt;
the entries are directories.&lt;br&gt;
&lt;br&gt;
Note: you may wish to examine some of Yair's old postings; if I recall &lt;br&gt;
correctly, he has the incantations to bring up the Java file browser.</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:13:23 -0500</pubDate>
      <title>Re: Obtaining Coordinates From Screen</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272198#715520</link>
      <author>TideMan</author>
      <description>On Feb 10, 10:53&#160;am, "Jane " &amp;lt;J...@mytrashmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Sorry for the double post. I ask this because I have read the help regarding Ginput and it only talks about selecting specific points on the screen and not picking points which are already there???&lt;br&gt;
&lt;br&gt;
I reckon that what you're trying to do cannot be done.&lt;br&gt;
plot3 does not produce a 3D plot, but the projection of the 3D plot&lt;br&gt;
onto your 2D screen.&lt;br&gt;
So when you try to use ginput, you are getting the projection, not the&lt;br&gt;
actual data.&lt;br&gt;
&lt;br&gt;
IMHO, your only hope is to plot your shape using contour or contourf.&lt;br&gt;
Now, you have a 2D shape, so you can find the x,y position using&lt;br&gt;
ginput and the corresponding z value by interpolation of the surface.</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:10:01 -0500</pubDate>
      <title>Re: Using slider to updating audio signal being played..real post</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272453#715521</link>
      <author>Walter Roberson</author>
      <description>Rick T wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; function slider1_Callback(hObject, eventdata, handles)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; sliderValue = get(handles.slider1,'Value');&lt;br&gt;
&amp;gt; %puts the slider value into the edit text component&lt;br&gt;
&amp;gt; set(handles.sliderValue_editText,'String', num2str(sliderValue));&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; freq=1;&lt;br&gt;
&lt;br&gt;
That line creates a variable named 'freq', not a variable named 'handles.freq'.&lt;br&gt;
&lt;br&gt;
&amp;gt; set(handles.freq,'Value',sliderValue); %sets freq when slider changes&lt;br&gt;
&amp;gt; %-------error it refers too above&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % Update handles structure&lt;br&gt;
&amp;gt; guidata(hObject, handles);</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:08:04 -0500</pubDate>
      <title>Re: Sum Matrix Subset</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272454#715519</link>
      <author>Daniel Blackmer</author>
      <description>"Daniel Blackmer" &amp;lt;daniel.blackmer@remove.thisgmail.dotcom&amp;gt; wrote in message &amp;lt;hkslll$5h9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have a sparse matrix which can get VERY large which I need to sum row subsets of, and I need it done with no for loops. As an example:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Create a new matrix which is defined by the sum of a finite number of column elements in input matrix &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; [1   2   3;&lt;br&gt;
&amp;gt;  4   5   6;         -----would become -------&amp;gt;    [5    7   9;&lt;br&gt;
&amp;gt;  7   8   9;                                                 17  19  21]&lt;br&gt;
&amp;gt; 10 11 12]   &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In this case I am just summing the columns of the two rows, and making that my first row, and then summing the bottom two rows and making that my second row. Its a simple example, however in practice this is dealing with such massive sparse matrices that solutions even involving the full() command will run my 12G of ram out in a fraction of a second. I have tried reshaping this into a N dimensional matrix where each subset is put into a third dimension, (which could work fine) except that there is no way to make a sparse matrix N dimensional, it must be 2 dimensional, and as I said it will crash the computer to remove the sparsity. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I know that I said it before, but I will say it again: I cannot use for loops. So many values last time I tried it changed my execution time from .56 seconds to 350 seconds.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any help anyone can provide here would be greatly appreciated!&lt;br&gt;
&lt;br&gt;
Darnit. When posted it messed up my example. Just to clarify:&lt;br&gt;
Input = [1 2 3; 4 5 6; 7 8 9; 10 11 12]; &lt;br&gt;
Output = [5 7 9; 17 19 21];</description>
    </item>
    <item>
      <pubDate>Tue, 09 Feb 2010 22:06:04 -0500</pubDate>
      <title>Re: Neural network toolbox acting weird?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/272451#715518</link>
      <author>Daniel Blackmer</author>
      <description>"George Burdell" &amp;lt;gburdell1@gmail.com&amp;gt; wrote in message &amp;lt;hkskq0$afs$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I am new to the neural networks toolbox, and am confused with its usage. Please take a look at the following simple code, and the output I received:&lt;br&gt;
&amp;gt; -----------------------------------------------&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; p = [0 1 2 3 4 5 6 7 8];&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; t = [ 0 1 0 0 1 0 1 1 0 ];&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; net = newff(p,t,20, {'tansig' 'logsig'});&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; [net,tr,y1] = train(net,p,t);&lt;br&gt;
&amp;gt; TRAINLM-calcjx, Epoch 0/100, MSE 0.313186/0, Gradient 0.0821321/1e-010&lt;br&gt;
&amp;gt; TRAINLM-calcjx, Epoch 6/100, MSE 0.142905/0, Gradient 0.000191683/1e-010&lt;br&gt;
&amp;gt; TRAINLM, Validation stop.&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; t(tr.trainInd)&lt;br&gt;
&amp;gt; ans =&lt;br&gt;
&amp;gt;      0     0     0     1     1     1     0&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; y1&lt;br&gt;
&amp;gt; y1 =&lt;br&gt;
&amp;gt;     0.0001    0.0001    0.0000    0.9974    0.9958    0.9757    0.0001&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; y2 = sim(net,p)&lt;br&gt;
&amp;gt; y2 =&lt;br&gt;
&amp;gt;     0.9483    0.6281    0.5996    0.5099    0.5625    0.8746    0.9630    0.6854    0.6178&lt;br&gt;
&amp;gt; &amp;gt;&amp;gt; y2(tr.trainInd)&lt;br&gt;
&amp;gt;     0.9483    0.5996    0.5099    0.5625    0.9630    0.6854    0.6178&lt;br&gt;
&amp;gt; --------------------------------------------------&lt;br&gt;
&amp;gt; My questions are:&lt;br&gt;
&amp;gt; 1. Aren't y1 and y2(tr.trainInd) supposed to be the same, or at least very similar? Why are they so different?&lt;br&gt;
&amp;gt; 2. It seems to me that the neural network was properly trained, at least for the training data it selected from t and p. But why are the values of y2 so off, when it comes from applying the training data on the neural network? &lt;br&gt;
&amp;gt; 3. I have also noticed that values of y2 never go below 0.5, even when using very large sizes for p and t (t is always either 0 or 1). Why does this happen? The "logsig" function maps numbers to the range (0,1). I must be doing something completely wrong here, but I have no idea what.&lt;br&gt;
&lt;br&gt;
Just to point out here, your dividing your "training" and "validation" data. since you are looking for an exact result, you may want to just change your divideFcn to '' like this: &lt;br&gt;
after running net = newff(); then do net.divideFcn = ''; or you can duplicate your target and input vectors and tell it to separate them in a block fashion instead of random.&lt;br&gt;
&lt;br&gt;
If you want your output values to be between 0 and 1 you should set your target vector to -1. Dont forget that logsig(0) = .5 That is evaluating itself correctly for what you have supplied it with. I got quite confused by this too!&lt;br&gt;
&lt;br&gt;
Hope this helps!</description>
    </item>
  </channel>
</rss>
