Re: Great, great Request



"Tato Jandieri" <vjandieri@xxxxxxxxx> wrote in message <h6viul$48e$1@xxxxxxxxxxxxxxxxxx>...
Hello,

I have a request and please help me. I think it is easy, but I failed.
It is urgent.

I have a physical problem that I am solving in Matlab.
I have 4 pulses f1(t), f2(t)... radiated from different receivers R(1), R(2)....
I have already written a loop for one pulse that characterizes f1(t) pulse propagation in medium:

for t=1:nmax
....................
R(1)=f1(t)
...................
end

My problem is that I would like to consider in the same loop 4 different pulses. When calculation for f1(t) is finished, calculation for f2(t) should start automatically...and so on.
Of course, I can copy 4 times the same loop for different pulses, but this loop is too big and it is very inconvenient. Please, help me. It is urgent.



Couldn't you just save the contents of your loop as a function, and call it 4 times, for your 4 pulses? You won't repeat the same part of code 4 times, and, secondarily, it will keep your main code smaller.

Otherwise, you might be able to genrate a matrix out of your 4 pulses and treat it in one loop, but I'm not sure it would be cleaner.
.



Relevant Pages

  • Great, great Request
    ... It is urgent. ... I have a physical problem that I am solving in Matlab. ... I have already written a loop for one pulse that characterizes f1pulse propagation in medium: ... Of course, I can copy 4 times the same loop for different pulses, but this loop is too big and it is very inconvenient. ...
    (comp.soft-sys.matlab)
  • Re: Precision peak detector
    ... will be used as an feedback for closed loop system therefore amplitude ... Do you have pulses that may go either above or below ground? ... Digital is a crock for high accuracy feedback loops running at any sort of speed. ...
    (sci.electronics.design)
  • Re: Precision peak detector
    ... Phil Hobbs wrote: ... will be used as an feedback for closed loop system therefore amplitude ... Do you have pulses that may go either above or below ground? ...
    (sci.electronics.design)
  • Re: Cassette port input frequency range? And CPU MHz ranges.
    ... used positive pulses for the MSN and negative pulses for the ... to reliably send data if using a full symmetrical cycle. ... Zero crossings are what is sensed, so preserving symmetry preserves the DC ... If you are sensing the crossings in a counted loop, ...
    (comp.sys.apple2)
  • Re: Serial Port programming - Reading DSR from port
    ... > am trying to do is get a count of how many pulses it sends per second. ... Therefore I haven't bothered to synchronize the inner ... long it takes to execute the inner loop. ...
    (comp.lang.perl.misc)