Search Engine

Iteration Matlab

Add Question

21 Threads found on Iteration Matlab
In the code below, i am using "for loop" to get values of px for each iteration of i. There should just be one value of px per iteration or loop, but i am getting three values instead. What could be the error in my code? clear; clc; for i = 0:1:4; for m = 1:1:4; if i == 0 px = 0.5; else if i == 2*m-1
Hi Joserse, I've not examined in detail the code (the lack of indentation make it a bit more difficult to identify loops and nesting), but these are some hints: = Move out the loops calculations that wuold be repeated at each iteration. For instance, sqrt(EB_NO*2) is used a lot of times inside loops, requiring the calculation of a square
Hi everybody, I got a problem when I try to use matlab connecting with CST 2010 and applying GA for simulation antenna. I setup for maximum of iterations (maxit) 100. But my simulation always stopped at the iteration of 26th. And a message appeared as "Server threw an exception". matlab can not call CST to keep run (...)
hiii am a beginner in turbo codes so anyoone can send me a code !!of 6 iteration or 4
Dear all, I want to know as how to store iterated result in matlab. I'm using a for loop,for every iteration of for loop i want to store the output.After completion of all iterations, the outputs are to be added for final result. In C language we use array.But in matlab, i'm not sure as how to code it. Plz (...)
A declaration like that defines the variable as a) existing, and b) being empty. (Disappointingly, the following lame example of bad programming practice is the best that springs to mind :) Let's say you have a loop in which a variable dynamically grows with each iteration*. For example: for i=1:10 a = ; end (This will build a row vec
Hi Try sim() function of matlab to execute your model in each iteration of loop. Like fid=fopen('file.txt'); fseek(fid,94,'bof') n=0; for (n=0:6) pause(0.5); A = fgetl(fid) A=str2num(A) sim('your_model'); % Collect output here. end fclose(fid);
Hello, my question should be simple. I wrote a matlab function which i´m using in a User-Defined simulink block. In this block i want to record the output in a vector, so i declare this vector has an emptys one (like a = ;) and than at every iteration i want to put the output in this vector. I alsoknow the final dimension of the vector, but ese
1): I am not sure about it, are you asking how to use the calculator's error function ? 2): how about using matlab to solve erfc (Error function) or to approximate the Error function by Taylor series, or iteration method and etc. within the allowable error range? For the definition of error function, you can google it. Hope this may help you.
Hi I am doing a turbo codec using matlab. I finished the encoding part and stuck up with the decoder. I tried using 'vitdec' a ready function available in matlab, but i cannot get soft outputs so that i can pass that info to the second decoder and begin the iteration process
references to dsplog zf-sic main.m M=2; Es_N0_dB=0:3:30; iteration=50; blocks=200; frames=40; frame_len=1; erros=zeros(2,length(Es_N0_dB)); for ii=1:length(Es_N0_dB) ii for mm=1:iteration for kk=1:blocks for ll=1:frames s_in=randint(2,frame_len,M); %
Hi, in the Radix-2 algorithm Decimation in time for 2 iteration for 8-point DFT, why do we keep the twiddle factor to W(0,8.0) and W(2,8.0) where normally we go in the series W(0,8), W(1,8)... If I'm not clear, please read my question and look at the implementation of 8-point DFT using 2-point DFT by FFT DIT method Add
I am working on building genetic algorithms for opimizing antennas parameters,especially microstrip antennas. I have used toolbox delivered via Internet for connecting HFSS-electromagnetic solver and GAs optimizer in matlab to do my work.However,when I did it,I have faced trouble that the results in each iteration have not been updated even thou
hello guyz.... there's a project that need 2 b d0ne here in my uni... well....i need to find differences between turbo codes and ldpc codes in wireless channel using matlab... these are my specific task... ? number of iteration o how the bit error rate (BER) will change as the iteration is increase compared to SNR ? modulation (...)
Hi, Could some one please elaborate if it is possible to 'not' have the figure window show up before a jpeg file creation (using print -djpeg command)? If used in a loop, the plot command takes a long time in creating the window on every iteration on the screen, when all I really want is to create a jpeg file afterwards. Thanks, /Hunter
its better to put the code so that its easier to answer. well... in your case i think you can plot the result by making an array of the results at each iteration. use the array indices like array(i) ... in the loop/iteration. if this doesn't solve your problem please post your code here.
Hi, I'm simulatin a lecture in FIR filter desigening I'm to desigen the filter (not using filters in matlab) the desigen scheme is iterative in witch each iteration requires 2 FFT computations. any way, I need an initial estimate & the lecture uses the ideal filter (LP)(rectangular) . I use the fir2... function in order to compute the
Hi everyone, is it possible to build an interface link between matlab and STK codes? I explain : part the output from STK are given to matlab code. It elaborates them and gives a feed-back to STK that continues its iteration. It's an iterative process. Is available a program like that? Any idea? Thanks in advance, Lupin
Hi all, I write a loop. Each iteration, the program fprintf a line to a file. When the loop is end, fclose(file_id) execute. Code like: file_id=fopen(); loop_begin, ... ... fprintf(); ... ... loop_end fclose(file_id); The problem is when I type Ctrl-C, the loop is interrupted. But the fclose() is not execute and lines a
Ahhh ... read one line per loop iteration! Is this what you have in mind? fin = fopen('mydata'); while ~feof(fin) foo = sscanf(fgetl(fin), '%d', ); disp(foo); % replace this with your line parsing code end fclose(fin);
Oh I see! You want a loop that reads one line from the file per loop iteration. How about this? fin = fopen('mydata'); while ~feof(fin) foo = fgetl(fin); disp(foo); % replace this with your line parsing code end fclose(fin);