1.75

1.8 | 17 ratings Rate this file 25 downloads (last 30 days) File Size: 2.32 KB File ID: #21922

comparisons

by PXlab

 

28 Oct 2008 (Updated 27 Jul 2009)

Code covered by BSD License  

a strategy of classification

Download Now | Watch this File

File Information
Description

This program show a strategy of classification. Is a statistics proposal. Is a comparison of two elements. There are two modalities: random pc and user input. In both, numbers in input are 6, three for the first element and three for the second element. The first double input is the time of two elements: time is a number in seconds or minutes or hours etc. The second double input is the number of objects (for example shoes purchased). The third double input is the number of approvals (for example shoes putted). The program, with if-elseif controls, write in output 12 decisions and show the results of the operations and say if winner is 1° element or if winner is 2° element. In this proposal of classification I’m finding 3 priorities; first priority is number of objects in each approval in the unity of time; second priority is time for each object for time of each approval; third priority is the total parity because if there is first priority in parity and second priority in parity then there is global parity.
http://spacelife.brinkster.net/comparisons.aspx
http://spacelife.brinkster.net/comparisons.htm

Acknowledgements
This submission has inspired the following:
EvenOddColorsMatrix
MATLAB release MATLAB 6.1 (R12.1)
Zip File Content  
Other Files comparisons.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (32)
29 Oct 2008 V. Poor

complete nonsense

29 Oct 2008 Hal 9000

This submission appears to have no real use or value, and is certainly not a jewel.

29 Oct 2008 PXlab

And now you could say to me why you must say this.
Are 9 combination-soluctions.
I’m writing 9 examples, one for each combination.
All the others numerical-combinations are in this group.
SOLUCTION 1 --> WIN 1
t1 = 1
t2 = 1
o1 = 1
o2 = 2
c1 = 2
c2 = 2
SOLUCTION 4 --> WIN 2
t1 = 1
t2 = 1
o1 = 2
o2 = 1
c1 = 2
c2 = 2
SOLUCTION 9 --> PARITY
t1 = 1
t2 = 1
o1 = 2
o2 = 2
c1 = 4
c2 = 4
SOLUCTION 3 --> WIN 2
t1 = 1
t2 = 1
o1 = 1
o2 = 2
c1 = 1
c2 = 2
SOLUCTION 6 --> WIN 1
t1 = 1
t2 = 1
o1 = 2
o2 = 1
c1 = 2
c2 = 1
SOLUCTION 7 --> WIN 1
t1 = 1
t2 = 2
o1 = 2
o2 = 2
c1 = 2
c2 = 1
SOLUCTION 8 --> WIN 2
t1 = 2
t2 = 1
o1 = 2
o2 = 2
c1 = 1
c2 = 2
SOLUCTION 2 --> WIN 2
t1 = 6
t2 = 2
o1 = 1
o2 = 3
c1 = 1
c2 = 9
SOLUCTION 5 --> WIN 1
t1 = 2
t2 = 6
o1 = 3
o2 = 1
c1 = 9
c2 = 1
Are 3 double variables.
I say with words 5° soluction: in a time of 2 years i write 3 books and 9 friends read my books; in a time of 6 years my sister write only one book and only one friend read her book. For me are 3 books each friend in 2 years, for my sister is 1 book and 1 reader in 6 years. Transformation in parity: for me are 9 books and 27 reader-friends in 6 years. Conclusion: 1 and 1 with 9 and 27 with parity of time. My result is better of my sister result.

29 Oct 2008 Hal 9000

It is a trivial operation:
-----
a = [2 3 9]; % time, books, and readers for person 1
b = [6 1 1]; % time, books, and readers for person 2
scaled_a = a.*max(b(1)/a(1),1); % result is [6 9 27]
scaled_b = b.*max(a(1)/b(1),1); % result is [6 1 1]
-----
Then compare the results using whatever standard you choose. Notice it only took me 4 lines to do this. Why did it take you 347?

29 Oct 2008 PXlab

Because you have your style and i have my style. A program, the same program, is editable in Inf ways where Inf is Inf different ways of name-variables and is Inf program-structures and is Inf different type of styles. My style and your style and all the others styles for the same product are an Inf with Inf ways of program-structure and Inf ways of different name-variables. Isn’t program few efficient, is your position different to my style, but the program is ok and the strategy is ok, isn’t in error. You have write 4 lines and in my program are this lines, not 347 lines (program are 326 in all): elseif (c1/o1)*(t1/o1)<(c2/o2)*(t2/o2), elseif (c1/o1)>(c2/o2), if (t1/o1)<(t2/o2), are 3 LINES in if-elseif controls and in this lines i can see the symbols of < and > and with other combinations there is also the = of the 9 soluctions. And for the input number is neccesary write “input” command or “randperm” command. Why don’t you write all program with your style? I will be very happy. For me is important also the “fprintf” command, to see output program on the video is very important.

29 Oct 2008 Hal 9000

I'm not going to waste my time writing such a trivial program. Even if you account for extra lines of input, error checking, and output, it still wouldn't come close to such a needlessly bloated and inefficient program. I'm going to point out the flaw in your logic with a real-world example:
Let's say I need to buy some milk. Here are 2 options I have to do so: 1) Walk down to the corner store and buy some. 2) Take a bus to California, then an airplane to Australia, then a boat to Africa, then ride a hot-air balloon back to America, landing in front of the same corner store. One of these options is clearly a superior choice. To imply that these two options are equally good choices is ignorance.
Put simply, your choice of "style" is inferior, no matter how many times you claim it isn't.

29 Oct 2008 PXlab

No no, I know your position, you say fine in your vision but isn't correct in my vision; if you write a program with few lines isn't true program is a better product of the same program with more lines. The min numbers of rows is important like way of few or more execution-time but the result is the same; if the time isn't important then one way or one of the other Inf ways is the same because the same is the result, if the time is important then two ways are inverse. I dont' say "more lines is better of few lines" if i think at the time but the result is the same; if i don't think at the time then more lines is better of few lines and the result is the same because all styles are important and is necessary to respect all styles. If is true your position then exist one way, only one way, to write a program. No. Inf ways.

30 Oct 2008 PXlab

bad bad

30 Oct 2008 Umberto Picchini

Marco, it's not fair for a contributor to rate his/her own programs. Rating is for reviewers: contributors should only comment, reply, discuss on their own submissions. Would you let a boxer give him/herself the score for his/her match? Please be honest with this community. My comment applies to almost all your submissions.

30 Oct 2008 PXlab

Thank you for this review, Umberto. Be honest. Yes! Is possible for me to put my five stars, not impossible. I’m honest. All people can see my five stars and also other comments. Also to have more nicknames is honest. For me V. Poor, Hal 9000, The Central Scrutinizer, Gilbert, programmer a are the same author and when I go in the author(s)-page(s) I don’t find files, I find zero files; I put files and there are people (authors? Where are the files?) with the courage to say bad words of my work. Is to be honest this? Yes or no, is possible put one star with a nick and one star with another nick and one star one star one star; ok, no problem. This is the modality. Problem is to despise and to say bad words. Without files is an extra demonstration of bad thinker. I said my arrogance is after arrogance of authors (authors?) with a strange brain. Anyhow thank you.

30 Oct 2008 John D'Errico  
30 Oct 2008 John D'Errico

Sorry, I forgot to enter a review. I'm afraid I'm still getting used to the new FEX. This is poor code. It is useless to anybody.

30 Oct 2008 Hal 9000

No, Marco. We are not all the same author. There's a good reason why we have started using these aliases to rate your code: we don't want to have to deal with your tantrums. This public forum is filled with experts in mathematics and programming, and a novice programmer like yourself should expect that he is going to get harsh criticism when posting these erroneous programs of yours. The adult response would be to actually listen to the criticism and improve your coding habits. Instead, you claim nothing is wrong with your style and then attack the submissions of people who give you bad reviews (like you did to John and Tim). This is an irresponsible and childish act, and is the very reason we have had to use aliases to give truthful criticisms of your work. If you are unable or unwilling to deal with harsh criticism, then this isn't the place for you to submit your work.

30 Oct 2008 PXlab

For Hal 9000.
For the same author I can't see, for me also John Tim etc are you, the virtual life is so, could be only one author with 1000 nicknames. No problem. But authors is man-woman with files. An expert or more experts in mathematics... have they find errors in my work? For me there isn't error in my ideas, but if isn't so we are here to say, in peace. I read only poor garbage to go out and this isn't a peace-comunication. Are this experts? I don't know this, I read words of not-experts. When I read despise-words, I think this isn't an expert. In the life certainly. And my mathematics is ok because pc don't say error. To understand me is necessary to think also at mathematics-formulas not teached, in Italy isn't teached 1=0 or 2=0 or Inf=0 or pi=4 etc etc, but if I can to think this and I can write programs with this formulas then formulas are something. This is reality, will be also fantasy but fantasy is reality. If I have an apple of 2 kg and I have 2 apples of 2 Kg in all then an apple is the same weight of two apples, is the formula 1=2 because 2 kg is 2 kg. My work is based on this ideas, years of research. I'm here in peace with education. Humanity, at this time, don't know all true-life, and i'm sure there are many (not one, but more) mathematics-beliefs in error and error is when the mathematicians say: "no, this is error, isn't possible!". I think this. If my work is in error I will remove all and I will say "excuse me", but I must understand. I also writed at the direction and said "if my work is poor and not acceptable then you (you Matlab-direction) must say to me go out". I'm honest.

30 Oct 2008 PXlab

For Tim Davis.
“First, it is a function with no inputs and outputs.” Boh! This isn’t true, there are 3 double inputs, more outputs and a selection of madality. You say so, maybe, because in the first line I write function NAME and stop. Ok, for this ok but my pc don’t say error for this. The input-output variables are a sector of the programmation delicate because all variables are outputs.
“if nargin == 0.” I don’t know this function, I’ll try other techniques, in the time, but program don’t say error.
“The code is not commented at all. There is no indication as to what problem it intends to solve.” You think this? Boh, the video-output is, for me, complete, and the video-output are the lines of code in fprintf. Indication. I said something in the description, to say other ok, is a function applicable in a lot of sectors and isn’t possible to say all in few lines; the three double inputs are 3 double generic variables. Numbers, with letters-associations multivariable.
“The statement tt1=randperm(10) is useless, since only the first entry is used; the rest is discarded.” Yes, 9 elements aren’t used. Also this is an important argument, I have say something in dice.m program and in diceN.m program. Isn’t necessary to use all vector-elements in this program.
“the function returns having done nothing at all” I dont’ understand this. You say of Matlab 7.6, my version is 6.
“with a terribly nested "if/then/else" structure” I don’t think this, all my programs are if then else, I love if then else, the controls are the program, the for while loop are the repetition. Terrible for you, not for me, this is an opinion. And I don’t understand because you must say terrible. Boh! To me at school have teached to write program with for while and if. Anyhow thanks for the considerations.

30 Oct 2008 PXlab

I’m happy for your work, a lot of thing, but I haven’t understand where is error in my mathematics. Then. Wanting is equal to without? My vocabular say this. You say “it wanting”. Without what? Or wanting is “horror”, in the sense “impossible Marco’s files”? I speack of mathematics, you say of the while loop and there isn’t error, program don’t say red letters with error in my Matlab version. I have used while with square symbols for convenience, if you want change program with a number of exit-option ok, this isn’t an error, the program go. If you use a number each step you must push a number, with only enter is a convenience. All here.
I write the inputs.
Line 9 is this: in=input('to select 1 or 2: ');
Line 51 is this: t1=input('time one = t1 = ');
Line 52 is this: t2=input('time two = t2 = ');
Line 53 is this: o1=input('objects one = o1 = ');
Line 54 is this: o2=input('objects two = o2 = ');
Line 55 is this: c1=input('approvals one = c1 = ');
Line 56 is this: c2=input('approvals two = c2 = ');
Line 322 is this: exit=input('enter... number+enter to quit ');
Outputs are all variables.
Question: with your style I must write this?
function [all variables] = comparisons (in,t1,t2,o1,o2,c1,c2,exit)
You say this?
The shoes is an example of Inf examples, are letters.
You can use books, files, etc etc.
Are 3 double input variables: t1 t2 o1 o2 c1 c2
I have used an association of this type: t=time o=object c=approvals. And this association is “large” but i can write Inf others letters-combinations.
x = floor (rand (1) * 1000) + 1.
Ok, thank you for this, for me is a jewel to know this, I don’t knowed this function, i haven’t a personal-teacher.
For the star: you write one star to me and I can’t write one star to you? Why? For me write one star isn’t good thing and i don’t write star but if you write me with one star i write one star to you. The not good thing start to you, not from me, but also my action isn’t good thing. I know this. Open nicks in anonimus like many others and write me star and star and star without courage to show the work. This is virtual, also this is the virtual life. Personally I love the virtual life, and here we are nickname(s), all, how can i to be sure if you are Tim Davis also in the reality-life? For this motivation is necessary to have an educated comportament, if no is to profit of other people in a bad way. Anyhow thanks Tim, this is to speack, in this reviews we are speaking. Thank you.

31 Oct 2008 PXlab

The program isn’t broken and the while loop is executed. I haven’t Matlab 7. In my version it lacked for nothing. And I have write my Matlab version in the file-submission. My code is born with its number of lines, if you want rewrite the program with your style for me there isn’t problem. But my program is my program. “I can read your work and understand it. You cannot rate mine because it is far beyond your understanding.” No, this isn’t honest. You can rate me and I can rate you. This is the modality. I’m not ashamed, for nothing. Nothing nothing. Program is a valid proposal, simple elementar etc but valid, the strategy is ok. Nick are 4 letters. So ok?

01 Nov 2008 alain boyer  
03 Nov 2008 Felix Zoergiebel

The prorgam does not execute unless you replace "while exit=[]" by "while isempty(exit)" that's a fact. Also think about what you want others to learn from your submission or how you want to make their work easier. Use comments in the code and explain things as short as possible. That will not only help others, but also will it give yourself much more satisfaction looking back to your work after some time when you might have forgotten about the details.

04 Nov 2008 PXlab

In Matlab 6 there isn’t problem of while. Comments. In this program is the program the better comment, the fprintf command of the video output.

04 Nov 2008 Anon

There is no video output. What video output?

Please check if the following command runs on your system
a= [];b=1; while a==[]; b =b+1;end

If b = 1 than your while statement is either needless, because the lines inside are never executed, or wrong, if the the lines should be executed.

Still, I don't understand you.

"This program show a strategy of classification. Is a statistics proposal. Is a comparison of two elements."

Now what is it. A classification, a comparison? What are elements? Objects characterized by different variables? Time, shoes and approvals?

Then you define winners

"winner is 1° element or if winner is 2° element"

What is degree here, and why does a classification, if it is one, return a winner?

So, please clarify.

Perhaps, take some TIME, put on your SHOES and think of your algorithm during a nice stroll outside. Then improve your code and, perhaps, then you'll get our APPROVAL.

04 Nov 2008 PXlab

Your “following command” in my system is an Inf loop of numbers: “b” variable inside while is 234567... In the program inside while of “exit” variable there is an input, this input: ('enter... number+enter to quit '); the loop go forward if I push enter and the end of loop is a combination number+enter; this statement in my sistem isn’t error, my Matlab Version is 6 Release 12.1 and I don’t know superior versions.
Classification of two elements is comparison of two elements with 3 double input, 3 input each element.
I write an example of my pc, I copy and paste the video, the monitor, the fprintf commands. This is video output in my language.
time one = t1 = 6 ..... for example years
time two = t2 = 3 ..... years up then years also here
objects one = o1 = 80 ..... for example books I have read
objects two = o2 = 23 ..... also here books, of my sister
approvals one = c1 = 8853 ..... for ex total pages of the books
approvals two = c2 = 9663 ...... also here total pages
time --> winner 1 ...... more time for me
objects --> winner 1 ...... more books for me
approvals --> winner 2 ...... more pages for my sister
approvals each object --> winner 1 ...... winner is the bigger number
o1/c1 = 0.0090
o2/c2 = 0.0024
approvals in the unity of time --> winner 1 ...... winner is the bigger number
t1/c1 = 6.7774e-004
t2/c2 = 3.1046e-004
time each object --> winner 1 ...... winner is the bigger number
o1/t1 = 13.3333
o2/t2 = 7.6667
objects in the unity of time --> winner 2 ...... winner is the bigger number
t1/o1 = 0.0750
t2/o2 = 0.1304
objects each approval --> winner 2 ...... winner is the bigger number
c1/o1 = 110.6625
c2/o2 = 420.1304
time each approval --> winner 2 ...... winner is the bigger number
c1/t1 = 1.4755e+003
c2/t2 = 3221
approvals each object and approvals in the unity of time --> winner 1 ...... priority 3
(o1/c1)*(t1/c1) = 6.1244e-006
(o2/c2)*(t2/c2) = 7.3897e-007
time each object and time each approval --> winner 2 ...... priority 2
(o1/t1)*(c1/t1) = 1.9673e+004
(o2/t2)*(c2/t2) = 2.4694e+004
objects each approval and objects in the unity of time --> winner 2 ...... priority 1
(c1/o1)*(t1/o1) = 8.2997
(c2/o2)*(t2/o2) = 54.7996
step: 1 ...... in this step I have write the six combinations of the double element with 3 and 3 input and I have write the 3 combinations ( triple priority) of their union
WINNER 2 ..... because I’m looking priority one.... if this priority is parity then I see the second priority and if it is in parity then there is triple parity
4° soluction ...... of 9 combinations the output soluction is this
enter... number+enter to quit ..... if I push enter in my pc there isn’t error here and if I push number+enter then I quit
...
In this days I stay using this software in different ways and is ok, I don’t find errors, in the code and in the mathematics. I have used this software in the tourney of soccer for example: input time (the same for all teams, one, an unity) and number of points and number of goals; is possible to use this program in more sectors. One (two input equal for all) or two (only one input the same for all) or three input numbers each element (player). There is all, to put more input isn’t necessary because the neural mechanism (basis of all) is a triple point. For applications with more of three input is necessary to insert 3 input and if are 4 then one input is inside to one of others three. With 5 numbers then 2 input are inside and with 6 input I have a double system of 3 and 3 input inside. This is the theory. One not arrive question is: Marco, why 3 inputs? Because in the model current is reference and is a double function up-down.

13 Dec 2008 alain boyer  
21 Jan 2009 Gavrilo Bozovic  
14 Feb 2009 pitta  
03 Jul 2009 James  
03 Jul 2009 C  
03 Jul 2009 Ripley  
03 Jul 2009 Bishop  
03 Jul 2009 newt  
03 Jul 2009 Hudson  
29 Oct 2009 Tyler Jandreau  
Please login to add a comment or rating.
Updates
27 Jul 2009

Add links
Modified while loop
Little reviews

Tag Activity for this File
Tag Applied By Date/Time
mathematics PXlab 29 Oct 2008 09:59:11
statistics PXlab 29 Oct 2008 09:59:11
comparison PXlab 29 Oct 2008 09:59:11
classification PXlab 29 Oct 2008 09:59:11
randperm PXlab 29 Oct 2008 09:59:11
input PXlab 29 Oct 2008 09:59:11
mathematics Cristina McIntire 07 Nov 2008 12:59:16
comparisons PXlab 27 Jul 2009 10:40:07
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com