f



error " Output argument "rate_match_output1" (and maybe others) not assigned during call to "C:\Users\USER\Documents\MATLAB\new_work\turbo1.m>turbo1".

my code is
function [  Z_TOT,Z_TOT_INTR,rate_match_output,rate_match_output1,F] = turbo1( SEG_BLOCKS )

global c_min
global c_max
global k_min
global k_max
global block_size
global filler_bits
global F1
global F2
persistent rate1
persistent rate2
%% matrix of k from aseel code
load turbo_intr
%% calculation of f2 matrix
load turbo_intr_2
%% matrix of f1
load turbo_intr_1

%i am trying to seperate blocks from SEG_BLOCKS
MIN_BLOCKS=SEG_BLOCKS(1,(c_max*block_size(1)+1):end);

for t=1:c_min
    N1=block_size(c_max+1);
    c1=MIN_BLOCKS(1,((t-1)*N1+1:(t*N1)));
    x_k1=c1;
    %% encode the message
    m1=0;                   % initial content of memory register equal zero
    m2=0;
    p=0;
    m3=0;
    z1=zeros(1,N1);
    for i=1:N1               % For N input bits
        b = xor(c1(i),m2);
        d = xor(b,m1);
        z1(i)=xor(d,p);
        m2=xor(m3,p);
        p=m3;
        m3=m1;             % Content of memory register m1 shifting to m3
        m1=b;
    end
    z1_tot(1,((t-1)*N1+1:(t*N1)))=z1;      % the total output after encoder

    %% choose the value of f1 & f2
    k1 = k_min;
    G=find(k1==turbo_intr);
    f1_value =turbo_intr_1(G);
    f2_value=turbo_intr_2(G);

    %% matrix after interleaver
    c_intr=zeros(1,N1);
    x=zeros(1,N1);

    for s=1:N1
        x(s)=mod((f1_value*s + f2_value*(s^2)),k1 );
        if x(s)==0
            x(s)=s;
        end
        c_intr(s)=c1(x(s));
    end

    %% 2_nd encoder after interleaver
    m11=0;                   % initial content of memory register equal zero
    m22=0;
    p1=0;
    m33=0;
    N1 = length(c1) ;         % N inputs to the ecoder
    z_intr1 = zeros(1,N1);         % output of encoder
    z_tot_intr1=zeros(1,N1);
    for i=1:N1               % For N input bits
        b1 = xor(c1(i),m22);
        d1 = xor(b1,m1);
        z_intr1(i)=xor(d1,p1); % output from 2_nd encoder after interleaver
        m22=xor(m33,p1);
        p1=m33;
        m33=m11;             % Content of memory register m11 shifting to m33
        m11=b1;
    end
    z_tot_intr1(1,((t-1)*N1+1:(t*N1)))=z_intr1 ;    % the total output after interleaver & encoder for seg max

T=rate(x_k1,z1,z_intr1);
rate1=zeros(1,length(T));
rate1(t,:)=T;
rate_match_output=rate1;
F1=Code_block_concatenation(T);
end
if c_max~=0
    MAX_BLOCKS=SEG_BLOCKS(1:c_max*block_size(1));
    
   MAX_BLOCKS(1,(1:filler_bits))=2;
    for g=1:c_max
        N=block_size(1);
        c=MAX_BLOCKS(1,(g-1)*N+1:(g*N));
        x_k=c;
        %% encode the message
        m1=0;                   % initial content of memory register equal zero
        m2=0;
        p=0;
        m3=0;
        z = zeros(1,N);         % output of encoder for one row
        for i=1:N               % For N input bits
            b = xor(c(i),m2);
            d = xor(b,m1);
            z(i)=xor(d,p);
            m2=xor(m3,p);
            p=m3;
            m3=m1;             % Content of memory register m1 shifting to m3
            m1=b;
        end
        z_tot(1,((g-1)*N+1:(g*N)))=z ;
        %% choose the value of f1 & f2
        k1 = k_max;
        G=find(k1==turbo_intr);
        f1_value =turbo_intr_1(G);
        f2_value=turbo_intr_2(G);

        %% matrix after interleaver
        c_intr=zeros(1,N);          % matrix after interleaver
        x=zeros(1,N);
        for s=1:N
            x(s)=mod((f1_value*s + f2_value*(s^2)),k1 );
            if x(s)==0
                x(s)=s;
            end
            c_intr(s)=c(x(s));
        end

        %% 2_nd encoder after interleaver
        m11=0;                   % initial content of memory register equal zero
        m22=0;
        p1=0;
        m33=0;
        N = length(c) ;         % N inputs to the ecoder
        z_intr = zeros(1,N);         % output of encoder for one row
        z_tot_intr=zeros(1,N);
        for i=1:N               % For N input bits
            b1 = xor(c(i),m22);
            d1 = xor(b1,m1);
            z_intr(i)=xor(d1,p1); % output from 2_nd encoder after interleaver
            m22=xor(m33,p1);
            p1=m33;
            m33=m11;             % Content of memory register m11 shifting to m33
            m11=b1;
        end
        z_tot_intr(1,((g-1)*N+1:(g*N)))=z_intr ;  % the total output after interleaver & encoder for seg min

U=rate(x_k,z,z_intr);
rate2=zeros(1,length(U));
rate2(g,:)=U;
rate_match_output1=rate2;
F2=Code_block_concatenation(U);
        %concatanation function
        
    end
else
    z_tot=[];
    z_tot_intr=[];
    rate_output=[];
    F2=[];
end
Z_TOT=[z_tot z1_tot];
Z_TOT_INTR=[z_tot_intr z_tot_intr1];
F=[F1 F2];
toc
end


and there is error 
Error in ==> turbo1 at 3
global c_min

??? Output argument "rate_match_output1" (and
maybe others) not assigned during call to
"C:\Users\USER\Documents\MATLAB\new_work\turbo1.m>turbo1".
?!!!!!!!!!!!!
how can i solve it ?!!!!!
0
y
3/23/2010 7:37:08 PM
comp.soft-sys.matlab 211264 articles. 26 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
1415 Views

Similar Articles

[PageSpeed] 37

> my code is
> function [  Z_TOT,Z_TOT_INTR,rate_match_output,rate_match_output1,F] = turbo1( SEG_BLOCKS )
....
> end
> 
> 
> and there is error 
> Error in ==> turbo1 at 3
> global c_min
> 
> ??? Output argument "rate_match_output1" (and
> maybe others) not assigned during call to
> "C:\Users\USER\Documents\MATLAB\new_work\turbo1.m>turbo1".
> ?!!!!!!!!!!!!
> how can i solve it ?!!!!!

Try assigning a value to rate_match_output1 ?!!!!! - even in the case that c_max is zero.

Your code is hard to read because it's not indented properly, but at a quick look I think the assignment to this variable only occurs when c_max is non-zero. As an output, it needs to be given a value no matter what branches the computation takes.

More generally, it would be a good idea to avoid global variables, and to split this function up into smaller, simpler functions that you can debug independently.
0
David
3/23/2010 7:53:23 PM
Reply:

Similar Artilces:

Error in get_Prefix (line 4) maskTmp = zeros(1,4); Output argument "prefix" (and maybe others) not assigned during call to "C:\Users\Suraj\Desktop\subfolder\get_Prefix.m>get_Prefix". Error in pr
function [prefix] = get_Prefix(inputIP,mask) maskTmp = zeros(1,4); for i=1:4 if mask >= 8 maskTmp(i) = 255; mask = mask-8; elseif mask ==0 maskTmp(i) = 0; else tmp=zeros(1,8); tmp(1:mask)=1; maskTmp(i) = sum(tmp.*2.^(numel(tmp)-1:-1:0)); mask=0; end end mask=maskTmp; numIP= convert_IP(inputIP); if numIP ~=-1 prefix = bitand(numIP,mask); prefix = convert_IP(prefix); end end ...

??? Output argument "r" (and maybe others) not assigned during call to "/home/mat/nonlinear_g.m>nonlinear_g".
Hi, I have been writing a code to solve a nonlinear system of waves and I am using the Newton -Raphson method to solve the system. I have a main program which computes the Jacobian and solves the linar system and I have a function which I discretise my system of equations. I get an odd error of: ??? Output argument "r" (and maybe others) not assigned during call to "/home/mat/nonlinear_g.m>nonlinear_g". My function that I have written is: function r=nonlinear_g(s,p,L,n,W) X=W(1:L); Y=W(L+1:2*L); u=W(2*L+1:3*L); v=W(3*L+1:4*L); E_x=W(4*L+1:5*L); E_y=W(5*L+1...

""""""""""""""""""""""ADD ME""""""""""""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfo Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... We look forward to build a ve...

"""""""""ADD ME""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfoi Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... ...

Urgent Requirement in """""""""""""NEW YORK""""""""""""""""
Hello Partners, Please find the requirement below. Please send the updated resume along with rate and contact no. REQ#1: Title : Java Developer ( Rating Project) Duration : 6 months Rate : open Location : NY strong java, WebLogic 9.2, Web Services, Oracle REQ#2: Title : Java Developer Duration : 4 months Rate : open Location : NY Strong java, SQL REQ#3: Title : VB.Net Consultant Location : NY Duration : 4 months Rate : open Primarily looking at someone who has Excel, VB.net a...

"/a" is not "/a" ?
Hi everybody, while testing a module today I stumbled on something that I can work around but I don't quite understand. >>> a = "a" >>> b = "a" >>> a == b True >>> a is b True >>> c = "/a" >>> d = "/a" >>> c == d True # all good so far >>> c is d False # eeeeek! Why c and d point to two different objects with an identical string content rather than the same object? Manu Emanuele D'Arrigo wrote: >>>> c = "/a" >>>&...

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By c...

"or" and "and"
Hi, I'm just getting to discover ruby, but I find it very nice programming language. I just still don't understand how the "or" and "and" in ruby... I was playing with ruby and for example made a def to print Stem and Leaf plot (for those who didn't have a statistics course or slept on it, e.g. http://cnx.org/content/m10157/latest/) Here is the Beta version of it: class Array def n ; self.size ; end def stem_and_leaf(st = 1) # if st != (2 or 5 or 10) then ; st = 1 ; end k = Hash.new(0) self.each {|x| k[x.to_f] += 1 } k = k.sort{|a, b| a[0].to_f <=&g...

"my" and "our"
Hi, while testing a program, I erroneously declared the same variable twice within a block, the first time with "my", the second time with "our": { my $fz = 'VTX_Link'; .... ( around 200 lines of code, all in the same block) our $fz = 'VTX_Linkset'; ... } So the initial contents of the $fz declared with "my" is lost, because "our" creates a lexical alias for the global $fz, thus overwriting the previous "my" declaration. It was my error, no question. But I wonder why Perl doesn't mention this - even with "use s...

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

"If then; if then;" and "If then; if;"
I have a raw data set which is a hierarchical file: H 321 s. main st P Mary E 21 F P william m 23 M P Susan K 3 F H 324 S. Main St I use the folowing code to read the data to creat one observation per detail(P) record including hearder record(H): data test; infile 'C:\Documents and Settings\retain.txt'; retain Address; input type $1. @; if type='H' then input @3 Address $12.; if type='P' then input @3 Name $10. @13 Age 3. @16 Gender $1.; run; but the output is not what I want: 1 321 s. main H 2 321 s. main P Mary E 21 F 3 321 s...

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

Urgent Requirement for """""""""""""""INFORMATICA DEVELOPER"""""""""""""
Hello Partners, How are you ? Please find the requirements below. Title: Database/ETL Developer Duration: 6 months Location: NY Exp: 7+ Locals preferred Database/ETL requirements (Mandatory) Candidate must have worked with financial instruments, preferably Mutual Funds but, Equities are also ok. PL/SQL - packages, Stored procs, Functions, Aggregate functions, Pipelined Functions Informatica 8.6 - especially complex mappings, complex maplets, complex workflows, transformations Oracle 10g/11g Unix/Linux shell scripting ...

"valid users" / "users"
Hi, I have some problems in understanding the "users" and "valid users" directive correctly. My setup: [global] .... security = server password server = authserver username map = /etc/samba/users.map .... [BLAH] only user = yes printable = no comment = Projekte-Bereich BLAH browseable = no writable = yes force create mode = 0660 create mask = 0660 force directory mode = 2770 directory security mask = 2770 force directory security mode = 0000 directory mask = 2770 force security mode = 0000 security mask = 0770 force group = +blah path = /pro...

Urgent need """""""""""INFORMATICA DEVELOPER"""""""""""""
Hello Partners, How are you ? Please find the requirements below. Title: Database/ETL Developer Duration: 6 months Location: NY Exp: 7+ Locals preferred Database/ETL requirements (Mandatory) Candidate must have worked with financial instruments, preferably Mutual Funds but, Equities are also ok. PL/SQL - packages, Stored procs, Functions, Aggregate functions, Pipelined Functions Informatica 8.6 - especially complex mappings, complex maplets, complex workflows, transformations Oracle 10g/11g Unix/Linux shell scripting Database/ETL requirements (Optional) Data warehousing experience Threading and job concepts in 10g/11g Cost based Optimizer concepts in 10g/11g Must : Experience with XML files and partitioning concepts in Oracle, Collections, Material Views Note : No phone calls please. : send Resumes to karthik@bhaninfo.com Thanks & Regards Karthik BhanInfo karthik@bhaninfo.com ...

Does it need a ";" at the very after of "if" and "for"
write code like: int main(void) { int a=10; if(a<20) {} } Compiler ok on dev-cpp . don't we have to add a ";" after if statement? marsarden said: > write code like: > > int main(void) > { > int a=10; > if(a<20) > {} > } > > Compiler ok on dev-cpp . don't we have to add a ";" after if > statement? The syntax for 'if' is: if(expression) statement There is no semicolon after the ) but before the statement. The statement is either a normal statement (which can be empty), ending in a semicolon:- if(expr) ...

"In" "Out" and "Trash"
I just bought a new computer and I re-installed Eudora Light on my new computer. But when I open Eudora, the "In", "Out" and "Trash" links are not on the left side of the screen the way they were on my old computer. How can I get these links back on the left side of the screen? Thank you. On 25 Mar 2007 09:49:22 -0700, "abx" <abfunex@yahoo.com> wrote: >I just bought a new computer and I re-installed Eudora Light on my new >computer. But when I open Eudora, the "In", "Out" and "Trash" links >are ...

A problem about "[ ]" "( )" "="
I want to read several images saved in a director,and give them to I1,I2 ,I3....,using the following codes: filelist=dir(['c:\MATLAB701\work\...\*.jpg']); for i=1 :length(filelist) I=imread(fullfile('c:\MATLAB701\work\...',filelist(i).name)); end; but failed. Then I used I(i)=imread... ,still failed. How could I do? "John" <mailofww@126.com> wrote in message news:ef19e12.-1@webx.raydaftYaTP... >I want to read several images saved in a director,and give them to > I1,I2 ,I3....,using the following codes: > filelist=dir(['c:\MATLAB701\work\.....

why have both "." and "->" ?
I used to remember why c++ needed both ? Could somebody help me here ? For example class A{ f(); }; A* aa; You could do either "aa->f()" or "(*aa).f()". So why does C++ need both operators. Raj "raj" <rajkumar@hotmail.com> schreef in bericht news:d7fee6d0.0406230748.694b966b@posting.google.com... > I used to remember why c++ needed both ? > Could somebody help me here ? > > For example > > class A{ > f(); > }; > > A* aa; > > You could do either "aa->f()" or "(*aa).f()". So why does C++...

[Q] How to escape "\a" "\b" "\c" "\f" "\n" "\r" "\t" "\v" in the string output?
Hi, there. Belows are some example strings which stand for M$ Windows directory path. How can I escape the special meanings like "\a", "\n", "\r" in these M$ Windows directory name strings? C:\amail\dir1\nbar C:\bmail\dir2\tbar C:\cmail\dir3\afoo C:\fmail\dir4\vfoo C:\nmail\dir5\fbar C:\rmail\dir6\abar C:\tmail\dir7\vfoo C:\vmail\dir8\cfoo Thanks in advance. In article <1161145522.072002.20370@m7g2000cwm.googlegroups.com>, "yh" <y.hosang@gmail.com> wrote: > Hi, there. > > Belows are some example strings which stand for M$ Wi...

["a", "b", "c", "d"] to "a, b, c, d"?
I want to process each element of an array, but the last element should be handled special. Here is an example: def p_ary(ary) str = "" ary.each do |elem| str << elem << ", " end str.chomp!(", ") str end so p_ary(["a", "f", "x", "test"]) produces "a, f, x, test". The code works, but isn't there an easier and more general way for this behaviour? martinus On Tue, 06 Apr 2004 04:23:22 -0700, Martin wrote: > I want to process each element of an array, but the last ele...

what does "->" and "=>" do?
I have read through php.net manuals and have not see any mention about what these operands actually do. I have seen them used in a bunch of different code lately and don't really understand. Example 1: // Legacy Function: Renders the Footer of the Theme function themefooter() { global $engine, $index, $themepath; if ($index != 3) { $engine->do_themefooter($index); } } Example 2: // get the color scheme $colors = pnModAPIFunc('Xanthia','user','getSkinColors', array('skinid' => $skinID, 'paletteid' => $paletteid)); If anyo...

matlab error "Input argument "resol_y" is undefined"
dear all.. i keep getting this error >>??? Input argument "resol_y" is undefined<< and the the error was pointed to here: function [snake_pnts,e] = snake(pnts, alpha, beta, max_delta_x, resol_x, ... max_delta_y, resol_y, feat_img) if resol_y < 1; resol_y = 1; end; <<-- the error can anybody help me?i'm new actually in matlab world this is the to the sourcesode <http://cobweb.ecn.purdue.edu/~malcolm/interval/1995-017/snake.m> "fiza" <pja_usm@hotmail.com> wrote in message news:ef58f4a.-1@webcrossing.ra...

"my books" and "my pictures" in "my documents"
How can I prevent "my books" and "my pictures" folders from being created periodically in "my documents"? They serve no useful function for me and get in my way. I have to delete them every couple of days. Any input would be appreciated. Thanks Carolyn Carolyn wrote: > How can I prevent "my books" and "my pictures" folders from being > created periodically in "my documents"? They serve no useful function > for me and get in my way. I have to delete them every couple of days. I assume that you don't kno...

Web resources about - error " Output argument "rate_match_output1" (and maybe others) not assigned during call to "C:\Users\USER\Documents\MATLAB\new_work\turbo1.m>turbo1". - comp.soft-sys.matlab

Resources last updated: 2/28/2016 8:54:39 PM