formula

Working with categorized Views with totals in Lotus Notes Designer

Hi, I have two forms with two views. That needs to access data from one another. I have a view that has been categorized and computes the total value per data. My problem now is, on a separate view, I need to extract the subtotals from view #1. For Example; On View #1, I have columns named Country (C1), State/City (SC) and Populati...

how to insert some formula in mysql?

i want to calculating one row at table "counter". i try to make my table like: name black yellow white qty_job total david 1 0 0 2 ? andrew 0 1 1 4 ? the formula to calculate is : total = (nblack * 1) + (nyel...

MAD formula for excel

What are the set excel formula for calculating 1) Median Absolute Difference MAD ...

How to optimize this computation

Hello, I'm writing a model-checker which relies on the computation of a coefficient which is used intensively by the algorithms which is the following: where q is double, t a double too and k an int. e stands for exponential function. This coefficient is used in steps in which q and t don't change while k always starts from 0 until th...

Binning in Excel

Which formulae in MS Excel can we use for - equi-depth binning equi-width binning ...

Binarization in excel

How would you perform binarization of an attribute with five categorical values in excel? ...

R: polynomial shortcut notation in nls() formula

With the linear model function lm() polynomial formulas can contain a shortcut notation like this: m <- lm(y ~ poly(x,3)) this is a shortcut that keeps the user from having to create x^2 and x^3 variables or typing them in the formula like I(x^2) + I(x^3). Is there comparable notation for the nonlinear function nls()? ...

Math function from php to MySQL

I need to use this function form php directly to mysql i'm currently using a simpler formula but this one works better, the porpose is to find the geodetic distance from two point on a map, so basically in my mysql i have a table with cities and avery city has its own lat,long values... his is the formula i would translate function di...

Formula for all first and second order predictors including interactions in R

In the statistics programming language R, the following formula (as used in lm() or glm()) z ~ (x+y)^2 is equivalent to z ~ x + y + x:y Assuming, I only have continuous predictors, is there a concise way to obtain z ~ I(x^2) + I(y^2) + I(x) + I(y) + I(x*y) A formula that does the right thing for factor predictors is a plus. O...

Calculating points from 0-10 for achived time

I have a Google Spreadsheet with a value (in seconds) for a lot of teams. I want to calculate points for each team from 0-10: 10 points for the team with the lowest value, 0 points for the team with the highest value and 9-1 points for the values in between (evenly distributed). I honestly can't think of any formular to do this...and I ...

MySql: What is the structure for "IF" formula? Please give example.

I try to use formula "IF" in view but dont know what the structure. Basically I try to divide two group of number. 0,1,2,3,4 after "IF" = 0 and 5,6,7,8,9 after "IF" = 1. Here is an example of my database: Row 1 / Column A = 8 column B = 1 column C = 2 Column D = 5 Column E = 7 Column F = 9 ...

How to formulate such problem mathematicaly? (line continuation search)

I have an array of "lines" each defined by 2 points. I am working with only the line segments lying between those points. I need to search lines that could continue one another (relative to some angle) and lie on the same line (with some offset) I mean I had something like 3 lines I solved some mathematical problem (formulation of wh...

Reporting Services - Giving a formula through Parameters

Hi, I'm using SSRS 2008, I'm building big reports and I use subreports, I need to give a formula by paramaters to a report. How can I do it ? I though about doing reflection on the parameters in order to use it like a formula. Do you have any ideas if it'll work ? Regards, ps : sorry for my bad english. ...

Lotus Notes Domino API - Generate Value From Formula

Hi All, Here's a tough one for you: I have a NotesForm object and I got the entire structure, including default values for fields, of which some are formulas. Now, I am creating some NotesDocument objects for that form using code. I have no idea of the structure of the NSF beforehand - only at runtime, The databse can come from anywhere...

could the MySQL show percent sign (%) in table

i want to show some data in percent. i have a mathematics formula like: (qty(S) + qty(B))/qty(id)*100% could i show the result for example like 25%? how do i do that? ...

Display group with no data in Crystal Reports 12

Hi, I am trying to group my data based on age. I use the following database select: select * from ( select 0 range_start, 11 range_end, '0-10 days' date_description from dual union select 11, 21, '11-20 days' from dual union select 21, 31, '21-30 days' from dual union select 31, 99999, '31+ days' from dual) date_helper left outer jo...

String to Number and back algoritm

This is a hard one (for me) I hope people can help me. I have some text and I need to transfer it to a number, but it has to be unique just as the text is unique. For example: The word 'kitty' could produce 12432, but only the word kitty produces that number. The text could be anything and a proper number should be given. One problem t...

Formula/Algorithm for Weighting Game Outcomes

I have an interesting conceptual problem, and I'm wondering if anyone can help me quantify it. Basically, I'm playing a set of games... and for each game I know the probability that I will win, the probability that I will tie, and the probability that I will lose (each game will have different probabilities). At a high level, what I wa...

Using stirling's factorial formula

I'm trying to write a code that calculates the approximate factorial of a number using Stirling's formula. Here's the line that calculates it: appFact = pow(exp, -num) * pow(num, num) * sqrt(2 * num * PI); The error comes in at pow(exp, -num) with pow underlined in red. IntelliSense: no instance of overloaded function "pow" matches ...

Getting the value in one column from a formula on another column in excel

I have an excel table that looks like this: Date Original Actual 11/10/10 15 12 12/10/10 12 10 ... 24/10/10 2 1 25/10/10 -2 0 I want to know the date at which the original column becomes negative, 25/10/10 in this example. I've managed to figure out the va...