<?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-2009 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>Fri, 20 Nov 2009 23:14:06 -0500</pubDate>
      <title>Re: Converting a cell array into a dataset</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266368#696446</link>
      <author>Matt </author>
      <description>"Bob " &amp;lt;bobychan@hotmail.com&amp;gt; wrote in message &amp;lt;he4mpd$sqg$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have two cell arrays obtained from a database fetch:&lt;br&gt;
&amp;gt; data (R x C) - contains data with columns of doubles and strings&lt;br&gt;
&amp;gt; data_fields (C x 1) - contains column names&lt;br&gt;
&lt;br&gt;
for i=1:length(data_fields)&lt;br&gt;
&lt;br&gt;
S.(data_fields{i})=[data{:,i}];'&lt;br&gt;
&lt;br&gt;
end</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 23:09:05 -0500</pubDate>
      <title>textread</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266448#696445</link>
      <author>Judy </author>
      <description>I am using textread to read a file.ext with a bunch of numbers inside.  It reads them all except for the last one!  Does anyone know why?  I also tried textread with a delimiter of \n and it still doesn't work...&lt;br&gt;
&lt;br&gt;
Here is a example of the numbers..&lt;br&gt;
116&lt;br&gt;
2845&lt;br&gt;
3555&lt;br&gt;
4783&lt;br&gt;
6748&lt;br&gt;
7051&lt;br&gt;
8420&lt;br&gt;
11078&lt;br&gt;
12540&lt;br&gt;
16038&lt;br&gt;
18066&lt;br&gt;
21597&lt;br&gt;
24390&lt;br&gt;
28349&lt;br&gt;
29880&lt;br&gt;
&lt;br&gt;
Textread outputs only:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;116&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2845&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3555&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4783&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6748&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7051&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;8420&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;11078&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;12540&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;16038&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;18066&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;21597&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;24390&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;28349&lt;br&gt;
&lt;br&gt;
Thanks in advance~</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:57:18 -0500</pubDate>
      <title>Importing data, Programming</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266447#696444</link>
      <author>M D </author>
      <description>Hi&lt;br&gt;
I am importing data from a text file and it always give me the same variable in workspace. If I import another file, it rewrite the variables.&lt;br&gt;
&lt;br&gt;
How to add string to the name of variables present in the workspace. For example we have five variables in the workspace i.e. x1,x2,x3,x4,x5. i would like to rename all of them by adding a string ('_test1') so that variable name would become x1_test1, x2_test1 ........ x5_test1. This would help me to compare the data of same parameter of different tests. &lt;br&gt;
One option is to do it manually by changing each variable one by one and then saving workspace but its a lengthy process as I have to analyse tons of data?&lt;br&gt;
&lt;br&gt;
Other solution is to write an M-file which takes the user "string input" at the command prompt and rename all the variables accordingly in the workspace. (This is what I am looking for)&lt;br&gt;
&lt;br&gt;
I would really appreciate if someone give me a clue about the command.&lt;br&gt;
&lt;br&gt;
Regards</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:55:19 -0500</pubDate>
      <title>Re: Help with finding index</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266446#696443</link>
      <author>ade77 </author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;he7677$3mi$1@news.eternal-september.org&amp;gt;...&lt;br&gt;
&amp;gt; ade77 wrote:&lt;br&gt;
&amp;gt; &amp;gt; I have an array of say :&lt;br&gt;
&amp;gt; ...&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I want to find the index of an exact vector.&lt;br&gt;
&amp;gt; &amp;gt; For instance,  I want to find the row index of vector ...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; doc intersect&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; --&lt;br&gt;
&lt;br&gt;
Thank you. Works perfectly</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:49:19 -0500</pubDate>
      <title>Re: quiver</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/264227#696442</link>
      <author>David Hannasch</author>
      <description>Hi,&lt;br&gt;
I have the same problem. I'm plotting six wind velocity fields that need to be correctly scaled to each other. I don't know how to prevent quiver from autoscaling, but I found a workaround that allows two graphs in the same figure to scale `correctly':&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stretch = mean(mean(magnitude) )*arrowScale;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;h = quiver(xcoord, ycoord, uvel, vvel, stretch);&lt;br&gt;
arrowScale is the same for all plots. You can set it to whatever value makes the plots visible (1000, 0.001, etc).&lt;br&gt;
It's quick and dirty, but it produces a figure that makes visual sense. If you have a graph and then the same graph with all the magnitudes doubled, then the arrows will come out the right length.&lt;br&gt;
To apply the same idea to your situation, if the second resolution is twice the first (for example), the autoscaling will make arrows half as long, so you'll need to stretch them back by a factor of two. Something like this might work:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;stretch = (1/gridScale)*arrowScale;&lt;br&gt;
&lt;br&gt;
Hope that helps,&lt;br&gt;
David&lt;br&gt;
&lt;br&gt;
"Merce Casas Prat" &amp;lt;merce.casas@upc.edu&amp;gt; wrote in message &amp;lt;hc6s2o$jvl$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have a question about quiver function in Matlab. If you plot a vector field (e.g wind) with a certain resolution and then you plot in the same figure a second wind field with a higher resolution, these two fields are plotted in a different scale (in order not to overlap, etc.). The (my) problem is: the function quiver autoscales the vectors and then (optionally) applies a scale factor (defined by the user). If you deactivate the autoscaling (setting scale=0) then you cannot choose any scale. Do you know how to control exactly the scale of the vector without any previous autoscaling (so I will be able to have a plot with 2 wind fields in the same scale)? And do you know any simple way to insert a legend in a quiver plot (i.e. a legend with, for example, an unitary horizontal vector)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Merc</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:45:50 -0500</pubDate>
      <title>Re: Help with finding index</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266446#696441</link>
      <author>dpb</author>
      <description>ade77 wrote:&lt;br&gt;
&amp;gt; I have an array of say :&lt;br&gt;
...&amp;gt;&lt;br&gt;
&amp;gt; I want to find the index of an exact vector.&lt;br&gt;
&amp;gt; For instance,  I want to find the row index of vector ...&lt;br&gt;
&lt;br&gt;
doc intersect&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:37:19 -0500</pubDate>
      <title>Help with finding index</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266446#696440</link>
      <author>ade77 </author>
      <description>I have an array of say :&lt;br&gt;
&lt;br&gt;
&amp;nbsp;a =&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2     3     4&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5     6     2&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4     2     1&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7     2     4&lt;br&gt;
&lt;br&gt;
I want to find the index of an exact vector.&lt;br&gt;
For instance,  I want to find the row index of vector [4 2 1], answer is 3(row 3).&lt;br&gt;
The vector [7 2 4] will return index 4.&lt;br&gt;
&lt;br&gt;
The find function does not work , any suggestion.</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:35:06 -0500</pubDate>
      <title>ylim</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266445#696439</link>
      <author>Shaddy </author>
      <description>can I use the ylim command to fix one side of the axis manually and leave the other one as auto ?&lt;br&gt;
&lt;br&gt;
Thanks</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:34:20 -0500</pubDate>
      <title>Basic PDE Boundary condition</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266444#696438</link>
      <author>Sang </author>
      <description>Hi~~&lt;br&gt;
&lt;br&gt;
I could not find any source for my question.&lt;br&gt;
Left boundary condition is du/dx=0&lt;br&gt;
Right boundary condition is du/dx=-1.5&lt;br&gt;
&lt;br&gt;
function [pl,ql,pr,qr] = pdex1bc (xl,ul,xr,ur,t);&lt;br&gt;
pl = 0;&lt;br&gt;
ql = 1;&lt;br&gt;
pr =?&lt;br&gt;
qr = ?&lt;br&gt;
&lt;br&gt;
What do I have to write to each term of pr and qr?&lt;br&gt;
&lt;br&gt;
Thank you in adavance.</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:26:03 -0500</pubDate>
      <title>Basic PED boundary condition</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266443#696437</link>
      <author>Sang </author>
      <description>HI~&lt;br&gt;
I am beginner... I couldn't find any source.&lt;br&gt;
&lt;br&gt;
For left boundary condition, du/dx=0&lt;br&gt;
For right boundary condition, du/dx=-1.5&lt;br&gt;
&lt;br&gt;
function [pl,ql,pr,qr] = pdex1bc (xl,ul,xr,ur,t);&lt;br&gt;
pl = 0;&lt;br&gt;
ql = 1;&lt;br&gt;
pr = ?&lt;br&gt;
qr = ?&lt;br&gt;
&lt;br&gt;
What do I have to wirte for each term of pr and qr?&lt;br&gt;
Thank you in advance.</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 22:25:22 -0500</pubDate>
      <title>smes unit</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266442#696436</link>
      <author>Andi Yunus</author>
      <description>Dear all,&lt;br&gt;
&lt;br&gt;
Hi is there anyone who has a model of smes (superconducting magnetic energy storage)? I tried to model it using universal bridge-GTO but it seems that the coil can't deliver power to the system when the firing angle more than 90 degree.&lt;br&gt;
&lt;br&gt;
Thanks in advance&lt;br&gt;
&lt;br&gt;
Shiddiq</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 21:56:19 -0500</pubDate>
      <title>Re: Converting a cell array into a dataset</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266368#696435</link>
      <author>Bob </author>
      <description>Further reading of the documentation showed how I can use the xlswrite and dataset constructor (with the 'XLSFile' switch) method, in conjunction with&lt;br&gt;
&lt;br&gt;
myDataset = set(ds, 'VarNames', columnNames');&lt;br&gt;
&lt;br&gt;
to create the dataset I wanted.&lt;br&gt;
&lt;br&gt;
However, I'm still curious whether there is a file I/O-free way of taking a cell array and turning it into a dataset.</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 21:41:19 -0500</pubDate>
      <title>bar plot BaseValue</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266441#696434</link>
      <author>Bo </author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I wanted to plot "bar" plot in "stack" style.  &lt;br&gt;
I can use BaseValue property to set specific base value.&lt;br&gt;
But how can I plot each group on a different base value?&lt;br&gt;
&lt;br&gt;
Thanks a lot!&lt;br&gt;
&lt;br&gt;
Bo</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 21:34:21 -0500</pubDate>
      <title>Re: MATLAB velocity vector interpolation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266227#696433</link>
      <author>Raphael Attie</author>
      <description>Hi Megan, (hi again Damian ;)&lt;br&gt;
&lt;br&gt;
So, if I understand correctly (please correct me if i'm wrong), your (Y,Z) coordinates is a 2D plane in which your Vx, Vy, Vz are defined, isn't it ? This is indeed what i think didn't get quite right at first, as I thought the Vx, Vy, and Vz were defined in a 3D box and not on a 2D plane. And I assume this plane would be defined by (y,z) coordinates, and that Damian referred as (x,y) coordinates, am i still correct guys ? &lt;br&gt;
&lt;br&gt;
I'll give the lead to Damian, he helped me out previously with my own case too, and i can again learn again from this example too.&lt;br&gt;
&lt;br&gt;
Raphael</description>
    </item>
    <item>
      <pubDate>Fri, 20 Nov 2009 21:22:19 -0500</pubDate>
      <title>mapshow + pcolor?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/266440#696432</link>
      <author>Joseph MacGregor</author>
      <description>I have successfully plotted a geotiff using mapshow. I would next like to overlay gridded data using pcolor, but it doesn't work and doesn't provide an error message. Instead, the plot becomes blank. Are these commands fundamentally incompatible? contourf and its ilk can be overlaid, but filled contours cannot be displayed transparently, so I cannot see the underlying geotiff? Any ideas? An example of the code:&lt;br&gt;
&lt;br&gt;
[A, A_colormap, A_ref, A_box] = geotiffread('A.tif');&lt;br&gt;
figure;&lt;br&gt;
mapshow(A, A_ref, 'displaytype', 'image'); % doesn't really need the displaytype switch&lt;br&gt;
axis equal;&lt;br&gt;
hold on;&lt;br&gt;
pcolor(x, y, z);&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Joe</description>
    </item>
  </channel>
</rss>
