473,732 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

correlation coefficient prob...

2 New Member
hello everybody...i m a newbie and struggling with a small assignment which involves
1- creating a dynamic array for floating point numbers
2- comparing adjacent numbers and finding the CORRELATION COEFFICIENT....


can u tell me what functions to use so dat i can start of with?? i wud b rlyyyy grateful...than xxx
Aug 19 '08 #1
7 1729
dlite922
1,584 Recognized Expert Top Contributor
do you know PHP?





Dan
Aug 19 '08 #2
siddharthkumarr
2 New Member
i do know d basics but d prob is i dnt know how to create a dynamic array...1 dimensional dynamic array for entering float point numbers.....
Aug 20 '08 #3
r035198x
13,262 MVP
i do know d basics but d prob is i dnt know how to create a dynamic array...1 dimensional dynamic array for entering float point numbers.....
Start by reading a tutorial on PHP arrays ...
Aug 20 '08 #4
dlite922
1,584 Recognized Expert Top Contributor
i do know d basics but d prob is i dnt know how to create a dynamic array...1 dimensional dynamic array for entering float point numbers.....
here's a code to create any array:

[PHP]

//first create the array:
$myArr = array();

//to add a value to the array (push on top/end)
array_push($myA rr,"value_here" );

// to traverse your array, you can use a for loop
for($i = 0; isset($myArr[$i]); $i++)
{
echo "index $i contains " . $myArr[$i] . "<br />";
}



[/PHP]

With PHP you can mix the any type of variable in the array: you can have an array that contains text, integers , or any number, or boolean value.

Also you do not need to worry about the array size. that is automatically handled.

for more info, refer to:http://php.net/array


Good luck,





Dan
Aug 20 '08 #5
Atli
5,058 Recognized Expert Expert
You shouldn't call array_push to add a single variable to an array.
It is a lot faster to do it like so:
Expand|Select|Wrap|Line Numbers
  1. $array[] = $someVar;
  2.  
array_push should only be used when you need to add multiple elements to an array.
Expand|Select|Wrap|Line Numbers
  1. array_push($array, $var1, $var2, $varN);
  2.  
Aug 20 '08 #6
Markus
6,050 Recognized Expert Expert
Shouldn't that 'PLZ HELP..!!!' be removed?
Aug 20 '08 #7
Atli
5,058 Recognized Expert Expert
Shouldn't that 'PLZ HELP..!!!' be removed?
Good point. It should, and it has been.

siddharthkumarr ,

Please avoid putting phrazes like "plz help" in your thread titles. It makes it harder for the other members to spot problems they may be able to help with and it actually makes people less likely to read your thread.

Take a look at the Posting Guidelines please. It's all explained there.

MODERATOR
Aug 20 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2784
by: Prince Kumar | last post by:
I have the following query, which is takling couple of minutes to return 500+ rows! I have all the proper indexes and statistics is upto date. I correlation after the OR clause is the culprit. I have tried a few ways to get the sum and then join with the table pr. But am not getting the exact result. Can someone show me the way to write this query without using the
2
3193
by: Pasi Havia | last post by:
Hi, I am making a little program which calculates Wright's inbreeding coefficient. What I have a trouble with is converting the formula into a code. The formula is: Fx=? As I'm using plain text it might not appear correctly. The formula is also
1
5894
by: Ben | last post by:
I have written a procedure which calls the CORREL function of Excel to run correlation analysis on two arrays, then populate a table with the resulting correlation coefficient. This process loops through several records and recordsets. The procedure works well for awhile (sometimes upwards of 10,000 times!), but then mysteriously begins populating "0" as the correlation coefficient (even though I know this to be inaccurate). Sometimes,...
1
11474
by: Gary Wessle | last post by:
Hi I wrote a code to calculate the correlation between 2 sequence of double numbers presented as vectors. did I go about this the right way? thanks #include <vector> using std::vector;
7
3183
by: Nena | last post by:
Hi there, I'm trying to include the Numerical Recipes for C++ for the Dev-C++ Editor Version. But so far I've failed. Therefore I've copied all head-files (for example nr.h) into the folder where my program is. When compiling my program two windows are poping up. The first one is saying "Total errors 0" and "Size of
18
22398
by: robert | last post by:
Is there a ready made function in numpy/scipy to compute the correlation y=mx+o of an X and Y fast: m, m-err, o, o-err, r-coef,r-coef-err ? Or a formula to to compute the 3 error ranges? -robert PS: numpy.corrcoef computes only the bare coeff:
2
3342
by: truthinlife | last post by:
I am running the following commands on an AIX 5.2 server, using db2 udb v8.2.2. my ipcs -mb command gives me the following: IPC status from /dev/mem as of Mon Nov 20 12:47:25 EST 2006 T ID KEY MODE OWNER GROUP SEGSZ Shared Memory: m 0 0xffffffff --rw-rw---- root system 4096 m 1 0xffffffff D-rw-rw-rw- db2inst1 db2iadm1 140665792 m 70254596 0x0d00055c --rw-rw---- root system ...
3
10400
by: Vivek | last post by:
Hi, Can someone give an example of a query which produces the following warning: SQL0012W Correlation without qualification has occurred for the column "<column>".
9
10024
by: mail | last post by:
Hi I'm very sorry for maybe posting something which was already posted. --How can I compute the binomial coefficient in C++? <-- Is it possible that there is no existing library for that out there (expect something that big like the gnu scientific library)? I searched the groups but couldn't find some good answers to this
0
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.