Search Engine

Max Array Value

Add Question

4 Threads found on Max Array Value
%For x=, calculate f(x)=xe^-2x. Report the value of x at which %f(x) is maximum. This value of x should be reported in variable "result" Why don't you do that by using the function max() already available on MATLAB standard install ?
min=0; max=0; while(1) { ADCON0 = ADC_SINE; ADCON0bits.GO = 1; while (ADCON0bits.DONE); //Terminates the A/D conversion when all the signal are converted adc_result = 256*ADRESH + ADRESL; // Store the result if(min > adc_result) min=adc_result; if(max < adc_r
Same way as you would do it in C (or whatever language you use): - use a counter to address the whole array one by one: at seach start set register to max value, and coutner to 0. for every data read: - compare output with a register - if lower, load register with read value Hope this helps.
Hi, I want to set arraysize based on the max value to be represented. Is this possible in verilog? i.e. parameter CLK_DIV = 27210; reg CLK_DIV_REG; //<<-- how do I set this array size automatically for when I change the parameter.