<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Matlab Forum RSS Feed (Replies Included)</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the 'Matlab' forum at Programmer's Heaven, including replies.</description>
    <language>en</language>
    <copyright>Copyright 2009 Programmers Heaven</copyright>
    <pubDate>Fri, 20 Nov 2009 20:00:58 -0700</pubDate>
    <lastBuildDate>Fri, 20 Nov 2009 20:00:58 -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>Re: SVD inconsistency</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409474/409668/re-svd-inconsistency/#409668</link>
      <description>It should work. I can't see the problem...&lt;br /&gt;
&lt;br /&gt;
From time to time there are some bugs appearing in Matlab...&lt;br /&gt;
Try to clear your workspace and try again.&lt;br /&gt;
Or exit from Matlab, re-enter and retry your function.&lt;br /&gt;
&lt;br /&gt;
Do this to test it&lt;br /&gt;
&lt;br /&gt;
clear; clc; format compact&lt;br /&gt;
&lt;br /&gt;
A = [1 2 3&lt;br /&gt;
    4 5 6&lt;br /&gt;
    7 8 9&lt;br /&gt;
    1 2 3&lt;br /&gt;
    8 6 2]&lt;br /&gt;
&lt;br /&gt;
[u s v] = svd(A);&lt;br /&gt;
m = u*s*v'&lt;br /&gt;
&lt;br /&gt;
Does m equal A?&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409474/409668/re-svd-inconsistency/#409668</guid>
      <pubDate>Fri, 20 Nov 2009 19:53:54 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Re: MATLAB GUI</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409617/409666/re-matlab-gui/#409666</link>
      <description>I don't want to post this message but I don't know how to delete it...&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409617/409666/re-matlab-gui/#409666</guid>
      <pubDate>Fri, 20 Nov 2009 19:40:11 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Re: MATLAB GUI</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409617/409665/re-matlab-gui/#409665</link>
      <description>I suggest you review this site:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.matrixlab-examples.com/matlab-gui-2tier.html"&gt;http://www.matrixlab-examples.com/matlab-gui-2tier.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It's a tutorial on GUIs. &lt;br /&gt;
It teaches how to use 'axes' to plot data.&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409617/409665/re-matlab-gui/#409665</guid>
      <pubDate>Fri, 20 Nov 2009 19:38:23 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>MATLAB GUI</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409617/409617/matlab-gui/</link>
      <description>Hi guys,&lt;br /&gt;
        Iam working to create a GUI using matlab. my program is being executed well iam getting output. but the thing is that when i want to plot the data using a GUI its giving problem. So can anyone help me out with this problem&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409617/409617/matlab-gui/</guid>
      <pubDate>Thu, 19 Nov 2009 22:06:09 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Subscripted assignment dimension mismatch</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409522/409522/subscripted-assignment-dimension-mismatch/</link>
      <description>Hi Everyone &lt;br /&gt;
&lt;br /&gt;
I have stored a few values in a structure. I am using the getfield() &lt;br /&gt;
function and after getting value of a single element which satisfies a &lt;br /&gt;
condition storing it in a variable varx &lt;br /&gt;
&lt;br /&gt;
The situation is like this: &lt;br /&gt;
for i=1:4 &lt;br /&gt;
for n=1:4 &lt;br /&gt;
varx(i,:) = getfield(J,{n,1}, 'val') &lt;br /&gt;
end &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
The 'val' field of the structure has values in the form &lt;br /&gt;
j1,j2,......j15. J is the name of the structure. &lt;br /&gt;
I have no problem if the 'val' field has values upto 'j9'. &lt;br /&gt;
But when the selected value is in the range j10,.....j15 &lt;br /&gt;
i get the following error: &lt;br /&gt;
??? Subscripted assignment dimension mismatch. &lt;br /&gt;
&lt;br /&gt;
Any help in this regard is highly appreciated. &lt;br /&gt;
Regards &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409522/409522/subscripted-assignment-dimension-mismatch/</guid>
      <pubDate>Wed, 18 Nov 2009 06:45:50 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>SVD inconsistency</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409474/409474/svd-inconsistency/</link>
      <description>Cannot figure out why the Matrix S1 and S2 differ. Seems to work when the Matrix S1 is a random matrix (rand) but when the source is a wave file which has been made into a matrix using the Short time Fourier transform S! and S2 differ and  i cannot seems to get back the original matrix S1. Anybody has any clue Why this happens? &lt;br /&gt;
&lt;br /&gt;
y = wavread('source.wav');&lt;br /&gt;
S1= myspectrogram(y);       % Generic routine to get the STFT&lt;br /&gt;
[U S V]=svd(S1);&lt;br /&gt;
S2= U*S*(V');&lt;br /&gt;
&lt;br /&gt;
If anybody has any clue plz reply. Thanks for looking.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409474/409474/svd-inconsistency/</guid>
      <pubDate>Tue, 17 Nov 2009 19:54:00 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Help generare grafic</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409468/409468/help-generare-grafic/</link>
      <description>As avea nevoie de ajutor referitor la realizarea unui grafic in matlab. Va atasez graficul si cerintele sunt urmatoarele:&lt;br /&gt;
   Semnalul modulator va fi situat în banda . 0,1-1khz               . şi va avea spectrul de forma din figura. Frecvenţa de eşantionare, Fs, va fi de. 50khz. Frecvenţa purtătoarei va fi de 0,1*Fs. Perioada de timp în care se prelevează eşantioane va fi aleasă astfel încât sa cuprindă minim 2 perioade din fiecare componentă spectrală a semnalului modulator.Ideea e ca se porneste de la un fisier pe care vi-l scriu mai jos.As fi recunoscatoare daca ar stii careva cum pot sa obtin graficul ,pornind de la fisier. Va multumesc mult:)&lt;br /&gt;
&lt;br /&gt;
“analog.m”:&lt;br /&gt;
&lt;br /&gt;
clear all&lt;br /&gt;
Fs = 100; % Frecventa de esantionare&lt;br /&gt;
Fc=10;  % Frecventa purtatoarei&lt;br /&gt;
t = [0:1/Fs:10]'; % perioada de timp in care se preleveaza esantioane&lt;br /&gt;
x = sin(2*pi*t); % semnalul modulator&lt;br /&gt;
figure(1);&lt;br /&gt;
subplot(3,1,1);&lt;br /&gt;
plot(t,x);  % reprezentarea grafica a semnalului x(t)&lt;br /&gt;
title('Semnal modulator');&lt;br /&gt;
xlabel('Timp');&lt;br /&gt;
ylabel('Amplitudine'); &lt;br /&gt;
spectrux = fft(x);&lt;br /&gt;
spectrux = abs(spectrux(1:length(spectrux)/2+1));&lt;br /&gt;
freq = ([0:length(spectrux)-1]/length(spectrux))*Fs/2;&lt;br /&gt;
figure(2);&lt;br /&gt;
subplot(3,1,1);&lt;br /&gt;
plot(freq,spectrux); % reprezentarea grafica a spectrului semnalului x(t)&lt;br /&gt;
title('Spectrul semnalului modulator');&lt;br /&gt;
xlabel('Frecventa');&lt;br /&gt;
ylabel('Amplitudine');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1332"&gt;grafic.bmp&lt;/a&gt; (158118 bytes | downloaded 2 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409468/409468/help-generare-grafic/</guid>
      <pubDate>Tue, 17 Nov 2009 12:36:40 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Help generare grafic</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409467/409467/help-generare-grafic/</link>
      <description>As avea nevoie de ajutor referitor la realizarea unui grafic in matlab. Va atasez graficul si cerintele sunt urmatoarele:&lt;br /&gt;
   Semnalul modulator va fi situat în banda . 0,1-1khz               . şi va avea spectrul de forma din figura. Frecvenţa de eşantionare, Fs, va fi de. 50khz. Frecvenţa purtătoarei va fi de 0,1*Fs. Perioada de timp în care se prelevează eşantioane va fi aleasă astfel încât sa cuprindă minim 2 perioade din fiecare componentă spectrală a semnalului modulator.Ideea e ca se porneste de la un fisier pe care vi-l scriu mai jos.As fi recunoscatoare daca ar stii careva cum pot sa obtin graficul ,pornind de la fisier. Va multumesc mult:)&lt;br /&gt;
&lt;br /&gt;
“analog.m”:&lt;br /&gt;
&lt;br /&gt;
clear all&lt;br /&gt;
Fs = 100; % Frecventa de esantionare&lt;br /&gt;
Fc=10;  % Frecventa purtatoarei&lt;br /&gt;
t = [0:1/Fs:10]'; % perioada de timp in care se preleveaza esantioane&lt;br /&gt;
x = sin(2*pi*t); % semnalul modulator&lt;br /&gt;
figure(1);&lt;br /&gt;
subplot(3,1,1);&lt;br /&gt;
plot(t,x);  % reprezentarea grafica a semnalului x(t)&lt;br /&gt;
title('Semnal modulator');&lt;br /&gt;
xlabel('Timp');&lt;br /&gt;
ylabel('Amplitudine'); &lt;br /&gt;
spectrux = fft(x);&lt;br /&gt;
spectrux = abs(spectrux(1:length(spectrux)/2+1));&lt;br /&gt;
freq = ([0:length(spectrux)-1]/length(spectrux))*Fs/2;&lt;br /&gt;
figure(2);&lt;br /&gt;
subplot(3,1,1);&lt;br /&gt;
plot(freq,spectrux); % reprezentarea grafica a spectrului semnalului x(t)&lt;br /&gt;
title('Spectrul semnalului modulator');&lt;br /&gt;
xlabel('Frecventa');&lt;br /&gt;
ylabel('Amplitudine');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;strong&gt;Attachment:&lt;/strong&gt; &lt;a href="http://www.programmersheaven.com/mb/DownloadAttachment.aspx?AttachmentID=1331"&gt;grafic.bmp&lt;/a&gt; (158118 bytes | downloaded 5 times)</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409467/409467/help-generare-grafic/</guid>
      <pubDate>Tue, 17 Nov 2009 12:34:57 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>*while* loop homework problem</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409396/409396/while-loop-homework-problem/</link>
      <description>"One interesting property of a Fibonacci sequence is that the ratio of the values of adjacent members of the sequence approach a number called “the golden ratio” or PHI. Create a program that accepts the first two numbers of a Fibonacci sequence as a user input and then calculates additional values in the sequence until the ratio of adjacent values converges to within 0.001. You can do this in a WHILE loop by comparing the ratio of element k to element k-1 and the ratio of element k-1 to element k-2. If you call your sequence x, then the code for the WHILE statement is&lt;br /&gt;
&lt;br /&gt;
while abs(x(k)/x(k-1) – x(k-1)/x(k-2))&amp;gt;0.001"&lt;br /&gt;
&lt;br /&gt;
the first part of the code is:&lt;br /&gt;
x(1)=input('Enter the first starting value for your Fibonacci: ')&lt;br /&gt;
x(2)=input('Enter the second starting value for your Fibonacci: ')&lt;br /&gt;
&lt;br /&gt;
^^^but idk how to complete the rest with the WHILE loop&lt;br /&gt;
&lt;br /&gt;
i need to calculate how many terms [k] are needed to get an error within 0.001 units but im clueless...thanx in advance for any help guys&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409396/409396/while-loop-homework-problem/</guid>
      <pubDate>Mon, 16 Nov 2009 14:22:33 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>[deleted]</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409393/409393/deleted/</link>
      <description>[this thread is deleted]</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409393/409393/deleted/</guid>
      <pubDate>Mon, 16 Nov 2009 13:28:43 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Need Import/Export Help in Matlab!!</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409341/409341/need-importexport-help-in-matlab/</link>
      <description>Hi guys:&lt;br /&gt;
I want to import several txt files into Matlab and export the results(parameters) as several excel files(in one is prefer if possible) after Matlab execuation. Is it possible to do this in Matlab?&lt;br /&gt;
Thanks in advance!!&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409341/409341/need-importexport-help-in-matlab/</guid>
      <pubDate>Sun, 15 Nov 2009 23:37:32 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Would you like to Share Algorithms software of Image Processing?</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409270/409270/would-you-like-to-share-algorithms-software-of-image-processing/</link>
      <description>Hi, MATLAB`ers&lt;br /&gt;
 My Name : Tibyani, man, 40 years old, a Ph.D Student Grad. IPS, Waseda University. in image Processing.&lt;br /&gt;
&lt;br /&gt;
Now, I am studying about feature extraction and pattern matching,&lt;br /&gt;
&lt;br /&gt;
Do you have sourcecode MATLAB : Modified Dynamic Programming, Geometrical Features, Hu Invariant Moment, Countur Moment, Curvature Scale Space, Modified Fourier Descriptor ?&lt;br /&gt;
&lt;br /&gt;
if, OK, Please share that algorithms to me !&lt;br /&gt;
&lt;br /&gt;
Best Regards&lt;br /&gt;
Tibyani&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409270/409270/would-you-like-to-share-algorithms-software-of-image-processing/</guid>
      <pubDate>Fri, 13 Nov 2009 20:30:42 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>bioinformatics toolbox- command from turoial won't work</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409262/409262/bioinformatics-toolbox--command-from-turoial-wont-work/</link>
      <description>I am trying to do an HMM alignment, and I am talking the commands straight out of the tutorial, and I am getting errors. It is funny, because I can do other tutorials, its not like the whole thing is broken.&lt;br /&gt;
This is what happens:&lt;br /&gt;
&lt;br /&gt;
hmmmodel  = gethmmprof('PF00002')&lt;br /&gt;
&lt;br /&gt;
is the command.&lt;br /&gt;
&lt;br /&gt;
error:&lt;br /&gt;
??? Error using ==&amp;gt; pfamhmmread at 70&lt;br /&gt;
Input is not a valid PFAM file.&lt;br /&gt;
&lt;br /&gt;
Error in ==&amp;gt; getsangerdata at 180&lt;br /&gt;
        out = pfamhmmread(s);&lt;br /&gt;
&lt;br /&gt;
Error in ==&amp;gt; gethmmprof at 82&lt;br /&gt;
        model = getsangerdata(accessnum,'database','hmm',varargin{
:});&lt;br /&gt;
 &lt;br /&gt;
Does anyone know what is going on? &lt;br /&gt;
Thanks.&lt;br /&gt;
Mark&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409262/409262/bioinformatics-toolbox--command-from-turoial-wont-work/</guid>
      <pubDate>Fri, 13 Nov 2009 14:27:57 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>bioinformatics toolbox- command from turoial won't work</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409261/409261/bioinformatics-toolbox--command-from-turoial-wont-work/</link>
      <description>I am trying to do an HMM alignment, and I am talking the commands straight out of the tutorial, and I am getting errors. It is funny, because I can do other tutorials, its not like the whole thing is broken.&lt;br /&gt;
This is what happens:&lt;br /&gt;
&lt;br /&gt;
hmmmodel  = gethmmprof('PF00002')&lt;br /&gt;
&lt;br /&gt;
is the command.&lt;br /&gt;
&lt;br /&gt;
error:&lt;br /&gt;
??? Error using ==&amp;gt; pfamhmmread at 70&lt;br /&gt;
Input is not a valid PFAM file.&lt;br /&gt;
&lt;br /&gt;
Error in ==&amp;gt; getsangerdata at 180&lt;br /&gt;
        out = pfamhmmread(s);&lt;br /&gt;
&lt;br /&gt;
Error in ==&amp;gt; gethmmprof at 82&lt;br /&gt;
        model = getsangerdata(accessnum,'database','hmm',varargin{
:});&lt;br /&gt;
 &lt;br /&gt;
Does anyone know what is going on? &lt;br /&gt;
Thanks.&lt;br /&gt;
Mark&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409261/409261/bioinformatics-toolbox--command-from-turoial-wont-work/</guid>
      <pubDate>Fri, 13 Nov 2009 14:26:09 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Image Segmentation Using Matlab</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409193/409193/image-segmentation-using-matlab/</link>
      <description>Hello,&lt;br /&gt;
   I m a computer science student and i m working on a project on matlab and currently im stuck in a problem.The problem is that i want to &lt;br /&gt;
&lt;br /&gt;
extract head from this image without using imcrop command meaning that it should automatically search and detect the head(keeping this as the &lt;br /&gt;
&lt;br /&gt;
basic or common shape of the head) and extract the head from the background.Assuming the shape of the head to be like that for every image &lt;br /&gt;
&lt;br /&gt;
but "the size may vary".&lt;br /&gt;
Here is my sample image for the head shape&lt;br /&gt;
&lt;a href="http://img226.imagevenue.com/img.php?image=80992_4_122_64lo.jpg"&gt;http://img226.imagevenue.com/img.php?image=80992_4_122_64lo.jpg&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I would really appreciate your help,suggestions,references and support&lt;br /&gt;
or a sample code/demo on a matlab would be nice &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409193/409193/image-segmentation-using-matlab/</guid>
      <pubDate>Thu, 12 Nov 2009 21:18:15 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Image Segmentation Using Matlab</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409192/409192/image-segmentation-using-matlab/</link>
      <description>Hello,&lt;br /&gt;
   I m a computer science student and i m working on a project on matlab and currently im stuck in a problem.The problem is that i want to &lt;br /&gt;
&lt;br /&gt;
extract head from this image without using imcrop command meaning that it should automatically search and detect the head(keeping this as the &lt;br /&gt;
&lt;br /&gt;
basic or common shape of the head) and extract the head from the background.Assuming the shape of the head to be like that for every image &lt;br /&gt;
&lt;br /&gt;
but "the size may vary".&lt;br /&gt;
Here is my sample image for the head shape&lt;br /&gt;
&lt;a href="http://img226.imagevenue.com/img.php?image=80992_4_122_64lo.jpg"&gt;http://img226.imagevenue.com/img.php?image=80992_4_122_64lo.jpg&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I would really appreciate your help,suggestions,references and support&lt;br /&gt;
or a sample code/demo on a matlab would be nice &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409192/409192/image-segmentation-using-matlab/</guid>
      <pubDate>Thu, 12 Nov 2009 21:15:14 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>MRD file</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/409164/409164/mrd-file/</link>
      <description>Hi,&lt;br /&gt;
  Can you please help me in extracting a MRD file and get the information from it to a microsoft excel file.&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
Sailaja.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/409164/409164/mrd-file/</guid>
      <pubDate>Thu, 12 Nov 2009 06:38:25 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Evaluate Function using vectors</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408842/408842/evaluate-function-using-vectors/</link>
      <description>How would I evaluate this using a row vector? (pref no loops! (its horrible!) &lt;br /&gt;
function [y, err] = arctanseries(x,n)  -&amp;gt; x is the row vector, n is just an integer.&lt;br /&gt;
&lt;br /&gt;
Thank you in advance to all who try! &lt;br /&gt;
&lt;pre class="sourcecode"&gt;

function [y, err] = arctanseries(x,n)

if(x&amp;gt;=(-1))&amp;amp;(x&amp;lt;=1)
    power = [];
    nom = [];
    denom = [];
    neg = [];
    answer = [];
    
    % Vector neg, alternating values, 1 -1 1 -1 for arctanseries
    neg = ones(1,n);
    neg(2:2:end) = -1;
    
    % Vector power, starts at 1, increases by 2 for n-1 times
    power = 1:2:((2*n)-1);
    
    % Vector denom, denominator of the arctanseries. stats at 1
    denom = 1:2:((2*n)-1);
    
    % Vector nom, nominator equals x
    nom = (ones(1,n))*x;
    
    % solve arctan series 
    answer = nom .^ power;
    answer = answer .* neg;
    answer = sum(answer ./ denom);
    
    % ***Output***
    y = answer;
else
    err = error('Input Error: x must be between -1 and 1 inclusive')
end

&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408842/408842/evaluate-function-using-vectors/</guid>
      <pubDate>Wed, 04 Nov 2009 18:28:07 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Evaluate Function using vectors</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408841/408841/evaluate-function-using-vectors/</link>
      <description>How would I evaluate this using a row vector? (pref no loops! (its horrible!) &lt;br /&gt;
function [y, err] = arctanseries(x,n)  -&amp;gt; x is the row vector, n is just an integer.&lt;br /&gt;
&lt;br /&gt;
Thank you in advance to all who try! &lt;br /&gt;
&lt;pre class="sourcecode"&gt;

function [y, err] = arctanseries(x,n)

if(x&amp;gt;=(-1))&amp;amp;(x&amp;lt;=1)
    power = [];
    nom = [];
    denom = [];
    neg = [];
    answer = [];
    
    % Vector neg, alternating values, 1 -1 1 -1 for arctanseries
    neg = ones(1,n);
    neg(2:2:end) = -1;
    
    % Vector power, starts at 1, increases by 2 for n-1 times
    power = 1:2:((2*n)-1);
    
    % Vector denom, denominator of the arctanseries. stats at 1
    denom = 1:2:((2*n)-1);
    
    % Vector nom, nominator equals x
    nom = (ones(1,n))*x;
    
    % solve arctan series 
    answer = nom .^ power;
    answer = answer .* neg;
    answer = sum(answer ./ denom);
    
    % ***Output***
    y = answer;
else
    err = error('Input Error: x must be between -1 and 1 inclusive')
end

&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408841/408841/evaluate-function-using-vectors/</guid>
      <pubDate>Wed, 04 Nov 2009 18:25:50 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Re: For Sale : Nokia N900 / Apple iPhone 3gs 32gb / Nextel i9 / i888</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408297/408726/re-for-sale--nokia-n900--apple-iphone-3gs-32gb--nextel-i9--i888/#408726</link>
      <description>We have this for sell, send us an email to sulearins@hotmail.com&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408297/408726/re-for-sale--nokia-n900--apple-iphone-3gs-32gb--nextel-i9--i888/#408726</guid>
      <pubDate>Mon, 02 Nov 2009 15:29:38 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>Re: MATLAB LOADING DATA FROM A .TXT FILE</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408647/408651/re-matlab-loading-data-from-a-txt-file/#408651</link>
      <description>use the parameter 'headerLines' within the textscan function.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
data1 = textscan(fopen(...), '%f %f %f', 'headerLines', 6)&lt;br /&gt;
The '6' means to skip the first 6 lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Learn Matlab here!&lt;br /&gt;
&lt;a href="http://www.matrixlab-examples.com"&gt;http://www.matrixlab-examples.com&lt;/a&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408647/408651/re-matlab-loading-data-from-a-txt-file/#408651</guid>
      <pubDate>Sat, 31 Oct 2009 17:30:51 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>MATLAB LOADING DATA FROM A .TXT FILE</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408647/408647/matlab-loading-data-from-a-txt-file/</link>
      <description>MATLAB LOADING DATA FROM A .TXT FILE?&lt;br /&gt;
&lt;br /&gt;
Please I need some help with this to finish my thesis.&lt;br /&gt;
 &lt;br /&gt;
I tried to load the solution.txt file in MATLAB, but i have been &lt;br /&gt;
unable to do it because it sais that there is a format problem &lt;br /&gt;
with the first rows, however i only need to load the rows 6 to 9 from the file &lt;br /&gt;
wich have a recognazible format and can be loaded with the textread function&lt;br /&gt;
&lt;br /&gt;
The solution.txt file has the following data:&lt;br /&gt;
&lt;br /&gt;
        OBJECTIVE FUNCTION VALUE&lt;br /&gt;
&lt;br /&gt;
        1)      3942307.    &lt;br /&gt;
&lt;br /&gt;
  VARIABLE        VALUE      REDUCED COST&lt;br /&gt;
     UI001         0.02     -96876.960938&lt;br /&gt;
     UI002         0.06     359612.000000&lt;br /&gt;
     UI003         0.01     392966.000000&lt;br /&gt;
     UI004         0.05     392966.000000&lt;br /&gt;
&lt;br /&gt;
       ROW   SLACK OR SURPLUS     DUAL PRICES&lt;br /&gt;
        2)         0.000000        -30.976025&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I only need to load rows 6 to 9, without changing in any way the solution.txt file.&lt;br /&gt;
The data i need would be:&lt;br /&gt;
&lt;br /&gt;
     UI001         0.02     -96876.960938&lt;br /&gt;
     UI002         0.06     359612.000000&lt;br /&gt;
     UI003         0.01     392966.000000&lt;br /&gt;
     UI004         0.05     392966.000000&lt;br /&gt;
&lt;br /&gt;
Could someone please tell me what function can i use to load the solution.txt file&lt;br /&gt;
but delimited only to the rows 6 to 9?&lt;br /&gt;
&lt;br /&gt;
Thank you&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408647/408647/matlab-loading-data-from-a-txt-file/</guid>
      <pubDate>Sat, 31 Oct 2009 15:37:52 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>drawing 3D plot using multiple 2D plots</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408629/408629/drawing-3d-plot-using-multiple-2d-plots/</link>
      <description>Hi, I am new learner of Matlab. I need your help urgently on drawing 3D plot using multiple 2D plots of x and y. &lt;br /&gt;
I have many data sets of x and y points in text file which create the non-uniform shape of two circles. Each data set gives different size of circle. &lt;br /&gt;
Using these multiple 2D slices, I need to create the 3D shape by stack them together in Z direction. &lt;br /&gt;
&lt;br /&gt;
Can anyone help me out? &lt;br /&gt;
&lt;br /&gt;
output image that I wanted is attached. &lt;br /&gt;
&lt;br /&gt;
Thanks for your help!!! &lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408629/408629/drawing-3d-plot-using-multiple-2d-plots/</guid>
      <pubDate>Sat, 31 Oct 2009 08:30:07 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>How can i do parallel processing in matlab????????????</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408507/408507/how-can-i-do-parallel-processing-in-matlab/</link>
      <description>How can i do parallel processing in matlab???????&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408507/408507/how-can-i-do-parallel-processing-in-matlab/</guid>
      <pubDate>Wed, 28 Oct 2009 20:45:29 -0700</pubDate>
      <category>Matlab</category>
    </item>
    <item>
      <title>plz explain to me why this!!!!!</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/408441/408441/plz-explain-to-me-why-this/</link>
      <description>hi guys, good morning&lt;br /&gt;
&lt;br /&gt;
guys im facing a little problem and need ur help if u dont mind&lt;br /&gt;
&lt;br /&gt;
i use maple kernel function in my program, here is the code:::&lt;br /&gt;
&lt;br /&gt;
maple('m:=',m_int2)&lt;br /&gt;
&lt;br /&gt;
ans =&lt;br /&gt;
&lt;br /&gt;
m := matrix([[119, 101, 108, 99, 111, 109, 101, 32, 116, 111, 32, 101, 108, 103, 97, 109, 97, 108, 32, 101, 110, 99, 114, 121, 112, 116, 105, 111, 110, 32, 112, 97, 114, 116]])&lt;br /&gt;
&lt;br /&gt;
but when i pass result from maple kernel function to matlam platform i got this answer&lt;br /&gt;
&lt;br /&gt;
mm=maple('m')&lt;br /&gt;
&lt;br /&gt;
mm =&lt;br /&gt;
&lt;br /&gt;
11910110809911110910103211611103210110810309710909
71080321011100991141211121161051111100321120971141
16&lt;br /&gt;
&lt;br /&gt;
as u can see guys the spaces between elements is deleted and answer looks like one number.....&lt;br /&gt;
&lt;br /&gt;
do u know why this happened???!!!!&lt;br /&gt;
&lt;br /&gt;
is there anyway 2 return answer back as it was inside maple kernel function???!!! i hope yes and u can help me guys&lt;br /&gt;
&lt;br /&gt;
thank u very much&lt;br /&gt;
&lt;br /&gt;
waiting 4 ur reply&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/408441/408441/plz-explain-to-me-why-this/</guid>
      <pubDate>Tue, 27 Oct 2009 20:59:52 -0700</pubDate>
      <category>Matlab</category>
    </item>
  </channel>
</rss>