help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I calculate probabilities using data files and sets of data n


From: Nicholas Jankowski
Subject: Re: how do I calculate probabilities using data files and sets of data numeric and text?
Date: Mon, 30 Nov 2015 09:52:56 -0500

On Mon, Nov 30, 2015 at 8:37 AM, Jonathan Camilleri <address@hidden> wrote:
This may sound like an odd question but let's say I have the question "how many items fit within a matrix/cell/set, then I assume nchoosek is not the right command to use right?

 Function File: C = nchoosek (N, K)
 Function File: C = nchoosek (SET, K)

Would you rather use sets?

Examples of input
1. m
m =
{
  [1,1] = Chicken
  [1,2] = Beef
  [1,3] = Ham
}
2. attached data file - sourced from http://archive.ics.uci.edu.



nchoosek will tell you either (a) how many independent combinations you can make from a set, or (b) what those combinations are.  I'm not sure exactly what you mean by 'fit within' a matrix/cell/set. That said, nchoosek expects to work on numerical values, not strings, and a set has to be a numerical vector/array, not a cell array

Maybe if you give us a specific example of the input and output you're looking to get with the simplified chicken/beef/ham example, we can provide better suggestions on the mathematical procedures to use.

nickj

reply via email to

[Prev in Thread] Current Thread [Next in Thread]