<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Matlab Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'Matlab' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2008 Programmers Heaven</copyright>
    <pubDate>Mon, 01 Dec 2008 19:51:02 -0700</pubDate>
    <lastBuildDate>Mon, 01 Dec 2008 19:51:02 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>query in genetic algorithm in matlab</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/382369/382369/query-in-genetic-algorithm-in-matlab/</link>
      <description>in my ga problem in matlab...i'm using binary input i.e. 'bit string'.. &lt;br /&gt;
ga is returning the best string... say it is x  &lt;br /&gt;
i want to use the best string (i.e. x) again in the same code(same .m file) as an argument to another function.&lt;br /&gt;
how can i do ??&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Sun, 30 Nov 2008 02:51:59 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>problem with integral</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/382342/382342/problem-with-integral/</link>
      <description>hi my friends.&lt;br /&gt;
I have a problem and i want your help.I have the next code.I want to find the integral(0,inf) of final for v=-12:0.05:2.for one value of v,for example &lt;br /&gt;
-11.95,the code gives me a result.When i try to change the value of v,-10.95 for example the value of subtotal is again the same and i dont know why.Why this happens?is there a problem in my code?Do you know what can i change to have for each value of v the equivalent subtotal and total?Because i want to make a plot(vdot,total) and with this code i think that the result will be a straight line which is wrong.&lt;br /&gt;
A=12.56e-4;&lt;br /&gt;
L=0.44;&lt;br /&gt;
vdot=v/L&lt;br /&gt;
G=2;&lt;br /&gt;
T=300;&lt;br /&gt;
q=1.6e-19;&lt;br /&gt;
k=8.62e-5;&lt;br /&gt;
%Edot between 0.01-0.7&lt;br /&gt;
Edot=0.01;&lt;br /&gt;
%Ndot between 10^8-10^15&lt;br /&gt;
Ndot=10^8;&lt;br /&gt;
%DE between 0.01-0.5&lt;br /&gt;
DE=0.05;&lt;br /&gt;
syms E;&lt;br /&gt;
&lt;br /&gt;
denom=1+exp((E-q*vdot)/(k*T));&lt;br /&gt;
function1=1./denom;&lt;br /&gt;
static=(G*Ndot)/(sqrt(pi/2)*DE);&lt;br /&gt;
ek8eths=((E+Edot+q*vdot)/DE).^2;&lt;br /&gt;
function2=exp(-2*ek8eths);&lt;br /&gt;
function3=function1.*static;&lt;br /&gt;
final=function3.*function2;&lt;br /&gt;
&lt;br /&gt;
%or if i try final=function1.*function2.*static is correct?&lt;br /&gt;
&lt;br /&gt;
subtotal=double(int(final,E,0,inf))&lt;br /&gt;
total=q*A*L*subtotal &lt;br /&gt;
&lt;br /&gt;
Maybe if i try to solve it with gaussian integral?But i dont know how to use this method... &lt;br /&gt;</description>
      <pubDate>Sat, 29 Nov 2008 01:16:23 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>spline</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/382307/382307/spline/</link>
      <description>how do i calculate the quadratic spline of a set of data in matlab. i want to plot the resulting functions.&lt;br /&gt;
&lt;br /&gt;
i can do it for linear with&lt;br /&gt;
&lt;br /&gt;
x = [10 13 14 15 18 20 25];&lt;br /&gt;
y = [11 15 16 14 24 34 36];&lt;br /&gt;
cs = spline(x,[0 y 0]);&lt;br /&gt;
xx = [10 13 14 15 18 20 25];&lt;br /&gt;
plot(x,y,'o',x,ppval(cs,x),'-');&lt;br /&gt;
&lt;br /&gt;
but i want spline with degree 2&lt;br /&gt;
&lt;br /&gt;
thanks.&lt;br /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 22:48:09 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>help with gui</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/382054/382054/help-with-gui/</link>
      <description>so i need to make a gui with 2 push buttons, one that increments a counter displayed in a text box and one that clears the count. the only problem is that im not entirely sure how to work the clear button out... im using a persistent variable in the first push button function to increment the counter, but since its a persistent variable only that function can use it, so when i clear the counter with the 2nd push button, the text diplays 0, but next time it is incremented it will resume at whatever number it was on. &lt;br /&gt;
-this is for an assignment by the way, i need to email only the .fig and .m files, so i cant create a new m-file&lt;br /&gt;</description>
      <pubDate>Wed, 19 Nov 2008 21:24:10 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>on sum</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/381900/381900/on-sum/</link>
      <description>when enter: 1+1&lt;br /&gt;
&lt;br /&gt;
surely I got: ans =&lt;br /&gt;
&lt;br /&gt;
     2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
when enter: sum 1+1&lt;br /&gt;
&lt;br /&gt;
I got: ans =&lt;br /&gt;
&lt;br /&gt;
   141&lt;br /&gt;
&lt;br /&gt;
why?&lt;br /&gt;</description>
      <pubDate>Sat, 15 Nov 2008 02:55:45 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>help with integrating formula</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/381694/381694/help-with-integrating-formula/</link>
      <description>hi, &lt;br /&gt;
Im tying to programme the formula which is attatched but im not sure how to do the integration part. &lt;br /&gt;
Could someone please let me know where im making mistakes and also could you please help me with the integration part. &lt;br /&gt;
This is my attemp so far:&lt;br /&gt;
&lt;br /&gt;
% Constants &lt;br /&gt;
a1 = 2.6; &lt;br /&gt;
a2 = 3; &lt;br /&gt;
r1 = 3.6; &lt;br /&gt;
r2 = 4; &lt;br /&gt;
d = 0.4; &lt;br /&gt;
h1 = 0.349; &lt;br /&gt;
h2 = 0.349; &lt;br /&gt;
u0 = 4.0*pi*1.0e-7; &lt;br /&gt;
&lt;br /&gt;
k = 0:5000000 &lt;br /&gt;
&lt;br /&gt;
%S(kr2,kr1) &lt;br /&gt;
S1 = (besselj(0,k*r2)-besselj(0,k*r1))/k &lt;br /&gt;
&lt;br /&gt;
%S(ka2,ka1) &lt;br /&gt;
S2 = (besselj(0,k*a2)- besselj(0,k*a1))/k &lt;br /&gt;
&lt;br /&gt;
%Q &lt;br /&gt;
Q = (2/k)*(h1+(exp(-k*h1)-1)/k) &lt;br /&gt;
&lt;br /&gt;
%first part before integration &lt;br /&gt;
F = (u0*pi)/(h1*h2*log(r2/r1)*log(a2/a1)) &lt;br /&gt;
&lt;br /&gt;
T = (S1.*(S2.*Q.*exp(-k*0)))&lt;br /&gt;</description>
      <pubDate>Mon, 10 Nov 2008 08:10:00 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>help with integration</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/381693/381693/help-with-integration/</link>
      <description>Hi,&lt;br /&gt;
Can someone help me integrate the following equation:&lt;br /&gt;
(S1*(S2*Q*exp(-k*0)))dk&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
k = 0:5000000 &lt;br /&gt;
S1 = 8 &lt;br /&gt;
S2 = 9&lt;br /&gt;
Q = 10&lt;br /&gt;</description>
      <pubDate>Mon, 10 Nov 2008 08:05:12 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Obtaining the original image back after applying fourier tranform</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/381666/381666/obtaining-the-original-image-back-after-applying-fourier-tranform/</link>
      <description>I am looking for some help on how to obtain an image back after applying t fourier transform. i have an image which i apply the fft2 function to, which gives me a complex 2 by 2 matrix, now how do i get to see the original image again?! &lt;br /&gt;
&lt;br /&gt;
the inverse function doesn't seem to work, and eventually i hope to apply some filter to the fourier transform and see how it affects the original image!&lt;br /&gt;</description>
      <pubDate>Sun, 09 Nov 2008 09:12:09 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>help with matlab syntax</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/381580/381580/help-with-matlab-syntax/</link>
      <description>hey guys im having trouble with some syntax, i know what i need the program to do but im not sure the syntax. I need the line in the for loop where it says Omega=??; I want to set Omega equal to the 'k-th' component of OMEGA, but I am not sure what is the syntax for that. Any help would be appreciated. Here is the script:&lt;br /&gt;
&lt;pre class="sourcecode"&gt;function lab10ex2
omega = 2; c = 1;
OMEGA = 0:.1:3; A = zeros(size(OMEGA));            
t0 = 0; y0 = 0; v0 = 0; Y0 = [y0;v0]; tf = 50; t1 = 25;
for k = 1:length(OMEGA)
    Omega = ??;                                
    param = [omega,c,Omega];
    [t,Y] = ode45(@f,[t0,tf],Y0,[],param);
    i = find(t&amp;gt;t1);
    A(k) = (max(Y(i,1))-min(Y(i,1)))/2;
end
Atheory = 1/sqrt((omega^2-Omega^2)^2+(c*Omega)^2); 
figure(1)
plot(t,y,'b-'); ylabel('y'); grid on;              
xlabel('\Omega'); ylabel('A');
%---------------------------------------------------------
function dYdt = f(t,Y,param)
y = Y(1); v = Y(2);
omega = param(1); c = param(2); Omega = param(3);
dYdt = [ v ; sin(Omega*t)-omega^2*y-c*v ];


&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;</description>
      <pubDate>Wed, 05 Nov 2008 22:08:39 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>visual basic and matlab</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/381474/381474/visual-basic-and-matlab/</link>
      <description>Can i call a visual basic program in a mfile?&lt;br /&gt;
if yes how?&lt;br /&gt;
the visual basic program performs some calculations and place some variables in work space ,mfile further performs operations.it means mfile will have to wait till the visual basic program finishes the calculations in some cases it might take half an hour .&lt;br /&gt;</description>
      <pubDate>Sat, 01 Nov 2008 22:01:53 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Error with Genetic Algorithm Toolbox</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/378306/378306/error-with-genetic-algorithm-toolbox/</link>
      <description>Hello all,&lt;br /&gt;
I am using Matlab Genetic algorithm toolbox to solve my function.&lt;br /&gt;
It gives an error and I couldnot understand. My function is as "objfun(CW,D)" and when solving on genetic algorithm toolbox it says D is undefined which is my variable.&lt;br /&gt;
Could anyone tell why this toolbox gives this error?&lt;br /&gt;
&lt;br /&gt;
Thanks for your helps...&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 08 Oct 2008 04:20:06 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Genetic algorithm toolbox</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/378232/378232/genetic-algorithm-toolbox/</link>
      <description>Hello all,&lt;br /&gt;
I am using matlab genetic algortihm tool to solve a function. I can have a result when I give numbers to my variables but genetic algorithm toolbox can not solve and gives an error message as "Subscripted assignment dimension mismatch." &lt;br /&gt;
But if there is any dimension mismatch on my function even it could not give the result when I solve it by giving the numbers isn't it?&lt;br /&gt;
I am giving my function here&lt;br /&gt;
%Objective Function&lt;br /&gt;
function [CT] = objfun(CW,D)&lt;br /&gt;
DEW=1000;&lt;br /&gt;
SS=4.74;&lt;br /&gt;
i=10;&lt;br /&gt;
L=100;&lt;br /&gt;
j=10;&lt;br /&gt;
CE=5;&lt;br /&gt;
DP=2;&lt;br /&gt;
CW(1:i,1:j)=CW;&lt;br /&gt;
CVM(1:i,1:j)=0;&lt;br /&gt;
L(1:i,1:j)=L;&lt;br /&gt;
D(1:i,1:j)=D;&lt;br /&gt;
for a=1:1:i &lt;br /&gt;
for b=1:1:j&lt;br /&gt;
CV(a,b) = CW(a,b)/(CW(a,b)+SS*(1-CW(a,b)));&lt;br /&gt;
DEM(a,b) = 1*(SS*CV(a,b)+(1-CV(a,b)));&lt;br /&gt;
CSI(a,b)=0.0039*(CV(a,b)^0.803);&lt;br /&gt;
if 0.3 &amp;lt;= CW(a,b) &amp;amp;&amp;amp; CW(a,b)&amp;lt; 0.45;&lt;br /&gt;
FCW(a,b) = 0.2067*CW(a,b)+1.035;&lt;br /&gt;
end&lt;br /&gt;
if 0.45 &amp;lt;= CW(a,b) &amp;amp;&amp;amp; CW(a,b)&amp;lt; 0.55;&lt;br /&gt;
FCW(a,b) = 1.52*CW(a,b)+0.444;&lt;br /&gt;
end&lt;br /&gt;
if 0.55 &amp;lt;= CW(a,b) &amp;amp;&amp;amp; CW(a,b)&amp;lt; 0.70;&lt;br /&gt;
FCW(a,b) = 6.1*CW(a,b)-2.075;&lt;br /&gt;
end&lt;br /&gt;
if CW(a,b) &amp;lt; 0.3;&lt;br /&gt;
C2(a,b)=0.75;&lt;br /&gt;
CVM(a,b)=1.1;&lt;br /&gt;
end&lt;br /&gt;
if 0.3 &amp;lt;=CW(a,b) &amp;amp;&amp;amp; CW(a,b)&amp;lt; 0.7;&lt;br /&gt;
C2(a,b)=2.135;&lt;br /&gt;
CVM(a,b)=FCW(a,b)*(DP.^0.75)*0.75*(SS^0.5);&lt;br /&gt;
end&lt;br /&gt;
if CW(a,b) &amp;gt; 0.7;&lt;br /&gt;
fprintf('No economical solution exists');&lt;br /&gt;
end;&lt;br /&gt;
CQM(a,b)=CVM(a,b)*pi/4;&lt;br /&gt;
C1(a,b)=CE*365*24*DEM(a,b)*CQM(a,b)*CSI(a,b)*(CVM(
a,b)^1.77)*L(a,b)/101.94;&lt;br /&gt;
C3(a,b)= 210.89*L(a,b);&lt;br /&gt;
C4(a,b)= 1.3744;&lt;br /&gt;
C(a,b)=C1(a,b)*D(a,b)^C2(a,b)+C3(a,b)*D(a,b)^C4(a,
b);&lt;br /&gt;
CT1= sum(C);&lt;br /&gt;
CT=sum(CT1,2)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
If anyone could help me I would be very glad.&lt;br /&gt;
Thanks...&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Tue, 07 Oct 2008 06:01:55 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>how to stop ode by considering infinite norm?</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/377995/377995/how-to-stop-ode-by-considering-infinite-norm/</link>
      <description>Would you please answer me how to stop ode eg.ode45 by considering infinite norm?&lt;br /&gt;</description>
      <pubDate>Mon, 06 Oct 2008 00:05:51 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Please help with this Linear Algebra problem.....</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/376716/376716/please-help-with-this-linear-algebra-problem/</link>
      <description>1. Matrix-matrix products:   &lt;br /&gt;
Consider two vectors &lt;br /&gt;
&lt;strong&gt;x=[1 2 3]&lt;/strong&gt; &lt;br /&gt;
&lt;strong&gt;y=[4 5 6]&lt;/strong&gt; &lt;br /&gt;
and two matrices &lt;strong&gt;A=[7 8 9; 10 11 12; 13 14 15]&lt;/strong&gt;&lt;br /&gt;
                 &lt;strong&gt;B=[12 3 ; 5 6 7; 8 9 10]&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
a. Find all legal MATLAB products (using * operator) between two vectors x and y that produce meaningful results. Show the results also. Exclude the array operator .*.&lt;br /&gt;
&lt;br /&gt;
b. Similarly, find all products between matrices A and B (and their transposes) and show the results.&lt;br /&gt;
&lt;br /&gt;
c. Find all legal products between vector x and matrix A.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 01 Oct 2008 20:25:49 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>ode45</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/376545/376545/ode45/</link>
      <description>Hi all, i have had to use ode45 in MATLAB to solve an ODE. This part was fine and the output is correct. It had to be plotted which was also no problem. The problem is the output is temperature versus time, and the final part wants the determination of a time constant from a known temperature. Is there any function that will determine this time from the graph or from the data solved in the ode solution. As so far nothing will work.&lt;br /&gt;</description>
      <pubDate>Tue, 30 Sep 2008 22:01:49 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>how to plot a function with limiting value of a constant</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/376273/376273/how-to-plot-a-function-with-limiting-value-of-a-constant/</link>
      <description>the function is&lt;br /&gt;
x(t)={t/A, 0&amp;lt;=t&amp;lt;=A;&lt;br /&gt;
      1  , A&amp;lt;t&amp;lt;pie(22/7)&lt;br /&gt;
      0,   pie&amp;lt;t&amp;lt;2*pie&lt;br /&gt;
      x(t+2*pie)=x(t);&lt;br /&gt;
&lt;br /&gt;
plot x(t) as A-&amp;gt;0,A-&amp;gt;pie;&lt;br /&gt;</description>
      <pubDate>Mon, 29 Sep 2008 03:02:51 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Use m file from console from other directory</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/376194/376194/use-m-file-from-console-from-other-directory/</link>
      <description>I use Linux.&lt;br /&gt;
Here is the problem. I need to run Matlab from console and calculate some things that use my functions contained in m files. When the m file (for example myfunction.m) is in the directory where I start matlab then I do it like this:&lt;br /&gt;
matlab -nojvm -r myfunction &lt;br /&gt;
This command calculates the myfunction at start, and that is what I need.&lt;br /&gt;
The problem is if I need to calculate something that is not inside the directory where I start matlab. I've tried:&lt;br /&gt;
matlab -nojvm -r /somedir/myfunction, but that doesn't work. Is there a solution for this?&lt;br /&gt;</description>
      <pubDate>Sun, 28 Sep 2008 09:30:56 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>IEEE754 support</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375746/375746/ieee754-support/</link>
      <description>1) Does Matlab support IEEE 754 double precision?&lt;br /&gt;
&lt;br /&gt;
2) How can I perform summation of a series in Matlab?&lt;br /&gt;
&lt;br /&gt;
Please reply.&lt;br /&gt;</description>
      <pubDate>Sun, 21 Sep 2008 18:31:32 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>image segmentation based on pattern</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375710/375710/image-segmentation-based-on-pattern/</link>
      <description>a very good day to all matlab expert here. anyone here know how to segment image based on pattern using gabor wavelet method?&lt;br /&gt;
&lt;br /&gt;
thanks for those who help.&lt;br /&gt;</description>
      <pubDate>Sun, 21 Sep 2008 04:42:15 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>scaling and rotating images</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375650/375650/scaling-and-rotating-images/</link>
      <description>HI.....&lt;br /&gt;
am a novice to matlab......can anyone temme how to rotate an image to a specifies angle and how to scale it given scaling factor.......cos all images r displayed as matrix in matlab, am confused.....is there any in built function to do....plzzz gimme ur inputs and suggestions&lt;br /&gt;</description>
      <pubDate>Fri, 19 Sep 2008 10:58:53 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>[askingHelp]getframe problem in gui</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375606/375606/askinghelpgetframe-problem-in-gui/</link>
      <description>Using function "getframe" in gui, when getframe is on process, i creat another exit_pushbutton which is expected to ask the user if he wants to quit. like following&lt;br /&gt;
-----------------------------------------------------------------------&lt;br /&gt;
exit_button = questdlg('Exit now?','Exit program','Yes','No','Yes');  &lt;br /&gt;
switch exit_button&lt;br /&gt;
    case 'Yes'&lt;br /&gt;
        closereq;&lt;br /&gt;
    case 'No'&lt;br /&gt;
        return;&lt;br /&gt;
end &lt;br /&gt;
------------------------------------------------------------------------&lt;br /&gt;
you know when exit_pushbutton is excuted, we make an interrupt to getframe, but the question is that if we select the 'yes' in the exit_button function,&lt;br /&gt;
first we make a interrupt to the function getframe then we closereq, but&lt;br /&gt;
the result is that&lt;br /&gt;
&lt;br /&gt;
**************************************************
*&lt;br /&gt;
??? Error using ==&amp;gt; capturescreen&lt;br /&gt;
Figure destroyed during getframe.&lt;br /&gt;
****************************************&lt;br /&gt;
&lt;br /&gt;
how to deal with?&lt;br /&gt;
&lt;br /&gt;
thx!!&lt;br /&gt;</description>
      <pubDate>Fri, 19 Sep 2008 06:41:29 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>LP and ODE Problem</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375426/375426/lp-and-ode-problem/</link>
      <description>According to some equations:&lt;br /&gt;
&lt;br /&gt;
For x &amp;gt; 0, let X= diag(x1, x2, …, xn) and PAX an orthogonal projection matrix defined as&lt;br /&gt;
PAX   =  In – XA'( A*X*X*A')^(-1)*A*X.&lt;br /&gt;
&lt;br /&gt;
For the standard linear programming&lt;br /&gt;
min c'x&lt;br /&gt;
s.t. Ax = b&lt;br /&gt;
      x ≥ 0&lt;br /&gt;
&lt;br /&gt;
dx/dt = -X*PAX*X*c,&lt;br /&gt;
&lt;br /&gt;
I want this LP problem by the above method:&lt;br /&gt;
&lt;br /&gt;
Min 4(x1)+(x2)  (Min c'x)&lt;br /&gt;
s.t.            (Ax=b)&lt;br /&gt;
3(x1)+ (x2)=3&lt;br /&gt;
4(x1)+3(x2)=6&lt;br /&gt;
 (x1)+2(x2)=3&lt;br /&gt;
(x1),(x2)&amp;gt;=0&lt;br /&gt;
&lt;br /&gt;
The code I wrote:&lt;br /&gt;
&lt;br /&gt;
function dxdt=func(t,x)&lt;br /&gt;
c=[4;1];&lt;br /&gt;
A=[3 1;4 3;1 2];&lt;br /&gt;
X=diag(x);&lt;br /&gt;
N=size(X);&lt;br /&gt;
n=N(1,1);&lt;br /&gt;
PAX=eye(n)-X*A'*inv(A*X*X*A')*A*X;&lt;br /&gt;
dxdt=-X*PAX*X*c;&lt;br /&gt;
&lt;br /&gt;
Then I use ode45:&lt;br /&gt;
ode45('func',[0.5,1.5],[0.5,0.5])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The result should be x1=0.6, and x2=1.2&lt;br /&gt;
However, the outcome shows that the matrix is singular, close to singular or badly scaled.&lt;br /&gt;
I tried to use different range and initial value but it still does not work.&lt;br /&gt;
Does anyone knows the reason?&lt;br /&gt;</description>
      <pubDate>Wed, 17 Sep 2008 11:04:17 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Binary number</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375412/375412/binary-number/</link>
      <description>How do I create a 32 bit binary for a negative integer? Also, if I have an array of integer elements, if some of the elements are like say say 2^15 or (2^5)-1, is there a command that can take the calculated value , or do I have to calculate it seperately?&lt;br /&gt;</description>
      <pubDate>Wed, 17 Sep 2008 04:52:05 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>I need to write by myself the function det</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375353/375353/i-need-to-write-by-myself-the-function-det/</link>
      <description>this is what my college gave me. &lt;br /&gt;
somebody can help me? &lt;br /&gt;
thanks&lt;br /&gt;</description>
      <pubDate>Mon, 15 Sep 2008 23:55:22 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Image processing questions</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/375290/375290/image-processing-questions/</link>
      <description>hi, I am a student currently planning to use matlab to analyze an image and recognize an object such as a tennis ball on an image.  &lt;br /&gt;
&lt;br /&gt;
I am a completely newbie to matlab. Most programming I have done is in VB.net. My professor recommended me to use matlab image processing toolbox. I just got the user guide today, it's like 1200 pages long. I will read it, but I am afraid the due date is too close. So I try to speed up the process by posting on the forum and look for some guidance. &lt;br /&gt;
&lt;br /&gt;
Basically we will take a picture of the entire court from above, and the tennis balls will lay on the court. It should be perfect circular with distinct yellow color. I used VB to scan the image pixel by pixel, and returned some RGB value. Then I set the program to return the pixel coordinate based on the RGB matching. Of course, each ball's color is slightly different because of shadow, resolution, etc&lt;br /&gt;
&lt;br /&gt;
However, it seems matlab offers way more techniques than just color matching. However, can someone give me some advise the technique I should go for? Or the chapters in the user guide that I should read first? or certain commands?&lt;br /&gt;
&lt;br /&gt;
Thank you very much.&lt;br /&gt;</description>
      <pubDate>Sun, 14 Sep 2008 18:34:30 -0700</pubDate>
      <category>Matlab</category>
    </item>
  </channel>
</rss>