Search Engine

Iteration Matlab

Add Question

38 Threads found on Iteration Matlab
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);
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
hey, It wasn't very difficult to analyze how it works once you have aligned the code properly and then debug it step by step for 1 particular polynomial. Here's how it works: 1) first we find the roots of the polynomial 2) There is a while loop which runs for each root. 3) If the root is real then obviously the factor is since
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, 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
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, 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
I have tried the simulation, but it is not giving me desired output and I cant understand some of the parameter.I dont understand the user option on the simulation,"Please enter number of frame errors to terminate: default 15 ". what does this mean actually. Besides, why the code is simulated until the frame error is acheived?not only once.i.e one
Hello, My work is on numerical techniques which require to solve sparse matrices etc. All my work is in fortran and I have almost no skill in matlab.But I have just realized that matlab can do some computations quite easily with its built-in functions and I want to take advantage of this. I have no time to learn matlab deeply or work on (...)
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); %
The angular position E along the elliptical orbit of a spacecraft is given by the following nonlinear equation: f(E)=nt-E+esinE=0 (1) where t is the time (in seconds) at which E is required, e is the eccentricity of the ellipse and u is the mean motion defined as: u=(m/(a^3))^1/2 with being the gravity constant of the planet and a is the semi-m
hi, i'm facing a problem with this attached matlab file. i don't know what this problem is but all what i know that the system is giving me zero output. when i tried to redo it by minimizing the no. of components that i put a hydraulic source with the pressure sensor but it said "Trouble solving algebraic equations in differential-algebraic system
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
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);
hey all, i have a matlab code that i should run it in (from 2 to 9 minutes) but it runs in 45 minutes, so i have ideas about improvement the performance of the code by minimize the loops and the use of pre-allocations of vectors, but still run in 45 minutes, any other ideas or advices for the improvement of the code ( outer loop iteration=15..inner
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
Wow, buddy Square root should be avoided in matlab? Is this your suggestion for all the equations? or only this one? When solving something for numerical methods you have to be careful with the function domain, because if an iteration falls outside (eg. complex values in real function, division by zero or ne
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 (...)
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 (...)
hiii am a beginner in turbo codes so anyoone can send me a code !!of 6 iteration or 4
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
When the following codes: % k=5 clear all; dummy=k ... were executed, matlab showed an error as follows: "??? Reference to a cleared variable k." However, when the following codes: % for i=1:5 i clear all; dummy=i end ... were executed, matlab did not show any error. The line dummy=i,
A friend of mine has problems with simulation in simulink i.e. simulation time is too slow and he has a lot of parameters to adjust in each iteration. He uses AMD Athlon XP2000+ CPU and want to know whether he buy an Intel CPU e.g. P4 3 GHz HT will he got smaller simulation time. Which CPU is better for simulation purposes AMD or Intel? Also, M
To find the roots if the given function,there are many numerical methods such as 1. Bisection Method 2. Newton ralphson method 3. Fixed point iteration 4. Muller's Method Or you can simply use roots command in matlab
This program is for Space-Time Turbo Coder and all the required modulation methods are included. %Space-Time Turbo Coder echo off clear all clear clc dec_alg = input(' Please enter the decoding algorithm. (0:Log-MAP, 1:SOVA) default 0 '); if isempty(dec_alg) dec_alg = 0; end awgn = input(' Please choose AWGN/Rayleigh (+1/-1): d
hi every1... I am started taking now Numerical Anaylsis course... and till now am very confused... very... does any1 know how to solve this problem please?? Let g(x) = -0.0001 x2 + x and p0 = 1, and consider fixed-point iteration (a) show that p0 > p1 > ? > pn > pn+1 > ? (b) show that pn > 0 for all n. (c) Since the sequence {pn} is
hi, Can any one answer my following questions: 1- How can I find FPGA implementation of arcsin() and do you know any references? 2- In matlab, how MathWork implement the arcsin() function do you know its algorithm? regards Dear Mr. I have same problem with you now, I need to calculate the ar
You cannot use the matlab conv here but if you really understand the convolution technique here's what you can do. 1. pre-pend and append n-1 zeros to your post-ifft ofdm signal. n = channel length 2. form an n-length vector from the zero-appended ofdm signal. 3. start a loop for m iterations. m= n+k-1. k=length of raw ofdm signal 4. for ever
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... 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 techniques o comparis
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 (...)
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
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
Hi I am also facing problem with this set of code in C. When the program is compiled, it does not shows the same result as in the book. It seems that the iteration is only ran once when the pulse is at the center. Does anyone here knows where is problem in this code. Thanks
Montadar, what is in the "Algorithm Collections for Digital Signal Processing Applications Using matlab" Any thing good? see this table of contents: Contents Preface xiii Acknowledgments x Chapter 1 ARTIFICIAL INTELLIGENCE 1 Particle Swarm Algorithm 1 1-1 How are the Values of ‘x’
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.
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
I've been working off of an IEEE paper ( ) and it's giving me a hell of a time trying to figure out how to implement equations 14 and 16.. I'm using matlab to implement the code and I've implemented equation 17, which is also recursive, but only calls on itself.. 14 and 16 call on each