|
Nelek wrote: dinamically
We understand your formula...but I can't understand how you wan't to 'dinamically ' change the parameters.
You have:
priority=f(par1, par2, par3,...,parN);
where f mixes that parameters with '* ' or '+ ' . This depends only on the logic of that parameter and only you can prepare f(...) .
Now, if I well understand you want to change the output of the function f(...) (ie the priority ) using the same parameters. This means that you need some extra parameters (we can call they as calibration-parameters): calib1 , calib2 ...calibM . In this case:
priority=g(par1, par2, par3,...,parN, calib1, calib2...calibM);
The function g is more complex from f (you can for example implement it as a FIR/IIR filter).
The problem now is how change the calibration-parameters calib* (par* are constants).
Then you need a calibration step. This to learn how set calib* values.
It is not looking very very simple ... but at the same time, not so hard
Russell
|
|
|
|
|
First of all, thanks for your answer. I know that is quite extrange, maybe with a little more info...
The fact is that the parameters won't change, I mean... they will be always the same parameters on the formule, but their value (at least in 70% of the parameters DO will change with the time).
Some of the parameters will have a constant value in every mashine, but others will change their value depending on the moment in which they are used. For example (taking the same parameters as above)
Permission can be 0 or 1 depending of the user that comand the mashine, if he wants the mashine to be available to interact with my program or not, or in some critical parts of the process where they have to work at 100% independantly of what happens around.
Already_Activate can be 0 or 1, this parameter will be set/reset by my programm.
Energy depends on the concrete mashine, from one mashine to another may be different, but always constant for every mashine.
Reaction_time is mashine dependant, like the energy. Is the time between my command and the answer to that command.
Non_Stop_Time is variable for every case, it is the time between the last time that the mashine had a command from my programm to the actual moment.
StepValue [Actual] can be variable with the time, but according to a relation of fixed values (the array). In some minutes will have a value, in other moments another value and so on.
Because of that the output of the function will be variable with the time. And this value (priority) is the value that I will check in a for every certain periode of time to choose the mashine that has to receive my commands or specifications. The higher the priority is, has more oportunities to be selected.
The concrete problem is that the formule I have to create should take care of all the parameters with fixed value, the actual moment and the values of the parameters that change with the time.
Trying to write similar to your answer I need a function more o less like that:
Priority = F (par1, par2, ..., parN, f1(t), f2(t), ... fN(t));
I already know (more o less) where the parameters have to be placed (numerator, denominator), but my problem is to connect the terms. I mean... for example:
the boolean values are to allow, discard some terms, because of that are out to multiply the term: Permision * (....) would be like: if (!Permision) {continue;} in the first line of a while (...) or a for (...), but...
I don't know if it's better to use only one fraction and add, substract, multiply... the terms of numerator/denominator. If it's better to use more fractions adding every partial result... If it's better to use only multiplications and divisions and then normalize to a fixed interval...
I would like to have a priority with a similar value with mashines of similar properties, but the tests that I have made give me results that I don't like (differences to big between very similar cases, or too small with very different cases... things like that)
It is the first time I have to do something like this. Im not bad with the algorithms, but this is killing me
Is there any procedure to reach such a thing? or is just empiric with tests and failures?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
I'm quite sure that to solve this problem you have to solve it in 2 steps:
Step 1:
Nelek wrote: Permission can be 0 or 1 depending of the user that comand the mashine, if he wants the mashine to be available to interact with my program or not, or in some critical parts of the process where they have to work at 100% independantly of what happens around.
Already_Activate can be 0 or 1, this parameter will be set/reset by my programm.
Energy depends on the concrete mashine, from one mashine to another may be different, but always constant for every mashine.
Reaction_time is mashine dependant, like the energy. Is the time between my command and the answer to that command.
Non_Stop_Time is variable for every case, it is the time between the last time that the mashine had a command from my programm to the actual moment.
StepValue [Actual] can be variable with the time, but according to a relation of fixed values (the array). In some minutes will have a value, in other moments another value and so on.
There are what we called Parm1 , ... parmN (parm* )
Now fix a 'standard ' output:
priority_Std=F_std(parm1, parm2, ...parmN);
This step is quite simple, you gave good ideas on how mix this parameters to obtain the right output. The only problem is to choose the 'standard' output that you want to obtain (priority_Std).
I think that it could be the more probable output..
Step 2)
You will have
priority=priority_std+F_Variation(parm1, parm2, ...parmN, calib1, ...calibM);
M!=N in general (I hope that M<N)
where calib* is the calibration parameter at that time (you correcly refer this to a function of time), this mens that priority is a function of time. The parameters parm* mest be taken as constants.
Write the function F_std is quite simple...not the same for F_Variation !
One way is this
F_Variation=SumOn(i,j)(parm_i*parm_j*calib(i,j))
Now you have simply to find this calib values according on what priority_variation you want in different conditions.
Russell
|
|
|
|
|
I have to read it slowly because I don't get correctly what you mean (I'm not english speaker), but I think I have an aproximated idea.
Thanks a lot for your help. I didn't thought about doing it in two steps. I was combining all in only one step and that was to become crazy :P
P.S. how about your template?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
think also to this
parm(N+1)=time
in step 1 it values 0, so it comes only in the second step.
Nelek wrote:
P.S. how about your template?
not well
The compiler doesn't match well my specialization member function with the general declaration.
Give me 2 or 3 days to find the way to tell him that they are the same thing;)
thanks
Russell
|
|
|
|
|
To have value 0 in the step 1, shouldn't it be "parm (N - 1) = time"?????
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Sorry, probally I was not clear:
In the first step use only parm1 , parm2 , ... parmN .
where N is the number of parameters that you are talking about in the first post.
In the step 2 use:
parm1 , parm2 , ... parmN , and parmN+1 (i.e. the time)
put everithing here
F_Variation=SumOn(i,j)[parm_i*parm_j*calib(i,j)]
and now you have only to find the right values ot the calib matrix (it will be (N+1)x(N+1) ).
To solve it a possible way is to minimize the RMS method (mean squared error).
Russell
|
|
|
|
|
Just for Info...
after almost three weeks breaking my brain with the f u c k i n g formula, now is not needed . The client and my boss just choose to introduce a fixed priority given in the GUI, and then choose the maschines with that order. In case of having more than one mashine with the same value, then take a look into Energy and ReactionTime to select one of them.
It's to kill them
But as I always say... there is no bad thing that nothing good brings. The programming will be easier
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
What can I say? ...
Nelek wrote: The programming will be easier
It's true
Russell
|
|
|
|
|
I need sugge./ advice for video processing for bleow requirement
Person or object will be selected in the first frame of video sequence
manually by mouse. Now the selected object/persion should be segmented in
rest of the frames by the algorithm/porgram.
any souce code/algorithm/ links / suggestion are greatly appericated
Thanks in advance
->electron
|
|
|
|
|
|
Hi people
I have an idea for an algorithm, but am gonna need some help in actually implementing it.
What I need to do is read file paths from right to left, comparing all of them, finding the right-most unvarying element of the path.
An example of how I want this algorithm to work is below
C:\Root Dir\Const Sub Dir1\Sub Dir1
C:\Root Dir\Const Sub Dir1\Sub Dir2
C:\Root Dir\Const Sub Dir1
Path scanned was C:\Root Dir\Const Sub Dir1
Any ideas would be greatly appreciated
Cheers
Give me strength, give me caffeine
|
|
|
|
|
This might not be the most efficient way to do it, but break each path apart on \'s, and load all the data into a 2d array, individual paths in the rows, each folder in a separate column. The just compare one column at a time until you find one that isn't identical the whole way down.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
Thanks a lot, didn't think about using 2d arrays, you know if there is a way to compare a whole column in one go in c#?
Give me strength, give me caffeine
|
|
|
|
|
well you could sort and compare the first and last items but that would be slower than doing an iterative comparison.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
|
c#_keithy wrote: Any ideas would be greatly appreciated
Can't you just use PathCommonPrefix() ?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi i am student.im doing research about development of adaptive digital notch filter for the removal of 50Hz power line noise in ECG.i have a sample of 50Hz noise of ECG..now i need to call the file in mathlab..how must i do it?im very new to mathlab..please help me..
|
|
|
|
|
Probally the best place where put this question is on the mathworks forum.
However to load that file you have write some code , look at functions like fopen, fclose and fread..
Is it a text file or binary? do you know how it is written? Sometimes some functions are yet implemented: if it is a .wav the functions are ready in matlab.
Russell
|
|
|
|
|
the file is in decimal(negative and positive)..the noise signal is created in excell..should i use the fopen,fclose and fread for this type of file?
|
|
|
|
|
ashwiny wrote: should i use the fopen,fclose and fread for this type of file?
Of course you can.
with that functions you can open every file type, the problem can be if you know the file format, but this time I'm thinking that it is an ASCII file so there isn't problems.
You will need to functions like fscanf to read numbers from file.
All this functions can be used also in a simple C++ program, but in matlab you can find ready filters and display tools.
Russell
|
|
|
|
|
To get your data from Excel to Matlab you can simply save as a .csv file and read into Matlab using the textread [^] function. There are other ways, check the documentation.
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
I was wondering what folks thought about using fixed point on a modern desktop PC. I've done a few tests, and floating point seems faster. However, the algorithms I use for my DSP processing involve feedback. This leads to denormals. I can avoid them by adding a tiny constant value in the feedback loop. Which is ok, but with fixed point this is not a problem. So I'm considering rewriting at least some of my algorithms to used fixed point. I know this is something that you really have to play around with to find an optimal solution, but I was curious as to what others thought.
|
|
|
|
|
Leslie Sanford wrote: floating point seems faster.
Wow! This is the power of DSPs.
If it is really true then use they! It needs only more memory, I hope this will be not problem...
Russell
|
|
|
|
|
It is true - particularly with the SSE type instruction sets. For example, a 3.6GHz P4 (single core) can exceed 8GFLOPS on an FFT http://www.fftw.org/speed/Pentium4-3.60GHz-icc/[^]
scroll down to the single-precision complex 1D transforms
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|