Search Results

Search found 3425 results on 137 pages for 'polynomial math'.

Page 89/137 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • Putting newline in matplotlib label with TeX in Python?

    - by user248237
    How can I add a newline to a plot's label (e.g. xlabel or ylabel) in Matplotlib? For example, plt.bar([1, 2], [4, 5]) plt.xlabel("My x label") plt.ylabel(r"My long label with $\Sigma_{C}$ math \n continues here") Ideally i'd like the y-labeled to be centered too. Is there a way to do this? It's important that the label have both tex (enclosed in '$') and the newline. thanks.

    Read the article

  • effective functonal sort

    - by sreservoir
    I'm programming a function for a ti-nspire, so I can't use the builtins from inside a function. what is the most generally efficient algorithm for sorting a list of numbers without modifying the list itself? (recursion and list-splitting are fair game, as is general use of math.)

    Read the article

  • LaTeX vs DocBook

    - by yfel
    I have only little knowledge about LaTeX, basic formatting, basic math fomulae etc.. I found that LaTeX is hard to configure to my own flavor. Recently, I've heard about Docbook, which is also a typesetting mechanism, but much easier since it uses XML. So, if my main job using LaTeX/Docbook is writing a simple document (not a class book) with some mathematics, and I want easy configuration, and a highly constomizable application, which one is better, and is there any good book on Docbook?

    Read the article

  • What is the perfect skill set for a software engineer? [closed]

    - by Sergey
    Of course, except technology stack. I'm asking about more fundamental skills such as design patterns or math. POSSIBLE DUPLICATES: http://stackoverflow.com/questions/76364/what-is-the-single-most-effective-thing-you-did-to-improve-your-programming-skill http://stackoverflow.com/questions/132798/what-should-every-programmer-know http://stackoverflow.com/questions/1177724/what-soft-skills-make-a-great-programmer

    Read the article

  • Python Pandas operate on row

    - by wuha
    Hi my dataframe look like: Store,Dept,Date,Sales 1,1,2010-02-05,245 1,1,2010-02-12,449 1,1,2010-02-19,455 1,1,2010-02-26,154 1,1,2010-03-05,29 1,1,2010-03-12,239 1,1,2010-03-19,264 Simply, I need to add another column called '_id' as concatenation of Store, Dept, Date like "1_1_2010-02-05", I assume I can do it through df['id'] = df['Store'] +'' +df['Dept'] +'_'+df['Date'], but it turned out to be not. Similarly, i also need to add a new column as log of sales, I tried df['logSales'] = math.log(df['Sales']), again, it did not work.

    Read the article

  • How to "grep" out specific lline ranges of a file

    - by Mike
    There are often times I'll grep -l whatev file to find what I'm looking for. Say the output is 1234: whatev 1 5555: whatev 2 6643: whatev 3 If I want to then just extract the lines between 1234 and 5555, is there a tool to do that? For static files I have a script that does wc -l of the file and then does the math to split it out with tail & head but that doesn't work out so well with log files that are constantly being written to.

    Read the article

  • How to calculate a latlng on google map ceartain distance away from another?

    - by Rene Saarsoo
    To draw a circle on map I have a center GLatLng (A) and a radius (r) in meters. Here's a diagram: ----------- --/ \-- -/ \- / \ / \ / r \ | *-------------* \ A / B \ / \ / -\ /- --\ /-- ----------- How to calculate the GLatLng at position B? Assuming that r is parallel to the equator. Getting the radius when A and B is given is trivial using the GLatLng.distanceFrom() method - but doing it the other way around not so. Seems that I need to do some heavier math.

    Read the article

  • matrices&searching [closed]

    - by gcc
    question 1) between different characters&real numbers , finding specific one how could i do question 2) myfriend asked me a good question : can we divide two matrices to each other // in math , we havenot learned but maybe someone knows where we find the answer

    Read the article

  • Lua choose random item from table

    - by Zen
    Seems easy but I just don't get any further: Take this example: local myTable = { 'a', 'b', 'c', 'd' } print( myTable[ math.random( 0, #myTable - 1 ) ] ) Why doesn't it work? Google seems to have no answers on this either

    Read the article

  • How to access the elements in <script> inside the body tag

    - by Geetha
    Hi All, I am using <script> inside the body tag. <script type="text/javascript" language="javascript"> $('#audioVolume').text($('#audioVolume').text(Math.round((document.mediaPlayer.Volume + 2000) / 10) + "%")); </script> Error: Microsoft JScript runtime error: 'undefined' is null or not an object. Need: I want to access the html elements in <script inside the body tag.

    Read the article

  • C++ open source projects

    - by Chaoz
    Hello, I'm looking for a suitable open source project to work on in C++. It really can be anything. My background is in gaming, on both PC and consoles; but I'd prefer to work on something low latency or real time. I'm also interested in Math stuff. Do any of you guys have suggestions?

    Read the article

  • Scaling textSize in a TextView

    - by fiXedd
    Say I have a TextView of a particular size (doesn't really matter what... fill_parent, 20dip, whatever). Is it possible to tell the text to shrink/grow in size to fit the available space without doing a lot of math?

    Read the article

  • round() for float in C++

    - by Roddy
    I need a simple floating point rounding function, thus: double round(double); round(0.1) = 0 round(-0.1) = 0 round(-0.9) = -1 I can find ceil() and floor() in the math.h - but not round(). Is it present in the standard C++ library under another name, or is it missing??

    Read the article

  • How to convert from base-256 to base-N, where N is higher than 16?

    - by mark
    Dear ladies and sirs. I need to convert an array of bytes to another base, namely 85. In math terms the question is how to convert from base-256 to base-85 in the most efficient way? This question is inspired by my previous question - http://stackoverflow.com/questions/2827627/what-is-the-most-efficient-way-to-encode-an-arbitrary-guid-into-readable-ascii-3 Thanks.

    Read the article

  • Computing e^(-j) in C..

    - by Erkan H
    I need to compute imaginary exponential in C. As far as I know, there is no complex number library in C. It is possible to get e^x with exp(x) of math.h, but how can I compute the value of e^(-j), where j = sqrt(-1)?

    Read the article

  • C# float to decimal conversion

    - by Adrian4B
    Any smart way to convert a float like this: float f = 711989.98f; into a decimal (or double) without loosing precision? I've tried: decimal d = (decimal)f; decimal d1 = (decimal)(Math.Round(f,2)); decimal d2 = Convert.ToDecimal(f);

    Read the article

  • returning aligned memory with new?

    - by Steve
    I currently allocate my memory for arrays using the MS specific mm_malloc. I align the memory, as I'm doing some heavy duty math and the vectorization takes advantage of the alignment. I was wondering if anyone knows how to overload the new operator to do the same thing, as I feel dirty malloc'ing everywhere (and would eventually like to also compile on Linux)? Thanks for any help

    Read the article

  • How to figure out if two CGRect intersect?

    - by mystify
    In -drawRect: I want to check if the provided rect intersects with anotherRect. I'm not good at this geometry math stuff and especially at english so what I want to say is: If you have two sheets of paper on the desk, and one of them covers the other either completely or just a small portion, it is rectsIntersect = YES. How to check that out for rect and anotherRect?

    Read the article

  • How to "grep" out specific line ranges of a file

    - by Mike
    There are often times I'll grep -l whatev file to find what I'm looking for. Say the output is 1234: whatev 1 5555: whatev 2 6643: whatev 3 If I want to then just extract the lines between 1234 and 5555, is there a tool to do that? For static files I have a script that does wc -l of the file and then does the math to split it out with tail & head but that doesn't work out so well with log files that are constantly being written to.

    Read the article

  • Getting Frequency Components with FFT

    - by ruhig brauner
    so I was able to solv my last problem but i stubmled upon the next already. So I want to make a simple spectrogram but in oder to do so I want to understand how FFT-libaries work and what they actually calculate and return. (FFT and Signal Processing is the number 1 topic I will get into as soon as I have time but right now, I only have time for some programming exercises in the evening. ;) ) Here I just summarized the most important parts: int framesPerSecond; int samplesPerSecond; int samplesPerCycle; // right now i want to refresh the spectogram every DoubleFFT_1D fft; WAVReader audioIn; double audioL[], audioR[]; double fftL[], fftR[]; ..... framesPerSecond = 30; audioIn= new WAVReader("Strobe.wav"); int samplesPerSecond = (int)audioIn.GetSampleRate(); samplesPerCycle = (int)(audioIn.GetSampleRate()/framesPerSecond); audioL = new double[samplesPerCycle*2]; audioR = new double[samplesPerCycle*2]; fftL = new double[samplesPerCycle]; fftR = new double[samplesPerCycle]; for(int i = 0; i < samplesPerCycle; i++) { // don't even know why,... fftL[i] = 0; fftR[i] = 0; } fft = new DoubleFFT_1D(samplesPerCycle); ..... for(int i = 0; i < samplesPerCycle; i++) { audioIn.GetStereoSamples(temp); audioL[i]=temp[0]; audioR[i]=temp[1]; } fft.realForwardFull(audioL); //still stereo fft.realForwardFull(audioR); System.out.println("Check"); for(int i = 0; i < samplesPerCycle; i++) { //storing the magnitude in the fftL/R arrays fftL[i] = Math.sqrt(audioL[2*i]*audioL[2*i] + audioL[2*i+1]*audioL[2*i+1]); fftR[i] = Math.sqrt(audioR[2*i]*audioR[2*i] + audioR[2*i+1]*audioR[2*i+1]); } So the question is, if I want to know, what frequencys are in the sampled signal, how do I calculate them? (When I want to print the fftL / fftR arrays, I get some exponential formes at both ends of the array.) Thx :)

    Read the article

  • Calculate QuaterlyHour from Given two DateTimes in c#

    - by user281947
    I want to calculate the quarter Hour from the given two datetimes: Suppose datetime1 and datetime2 , i am doing somewhat like this : int d = datetime2.Subtract(datetime1).Hours; double l = Math.Round(Convert.ToDouble(d/4)); but if the QuarterHour is 3 (ie d=3), whats the good way to show the output- should it be zero or the round one : 3/4 = 0.75. so should i round up to 1 or 0 is ok. And if round up to 1..how should i?

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >