Search   Memberlist   Usergroups
 Page 1 of 1 [2 Posts]
Author Message
immernurzweiter@hotmail.c
science forum beginner

Joined: 10 May 2006
Posts: 7

Posted: Wed Jul 12, 2006 9:21 pm    Post subject: Compating double with Interval Problem Matlab

Hello,
I have got a porblem with Matlab.
I would like to find out, which numbers of a vector agree with an
interval.

Example: A = [4; 5; 6];

I will compare A with an interval of 90% - 110% around the vector B

B = [3.2; 5.05; 4.06]

I would like to have now the result that the second line a correct
Ergbenis ejects. Either logically or indexes.
Can someone help me?

Peter Spellucci
science forum Guru

Joined: 29 Apr 2005
Posts: 702

Posted: Thu Jul 13, 2006 11:04 am    Post subject: Re: Compating double with Interval Problem Matlab

"immernurzweiter@hotmail.com" <immernurzweiter@hotmail.com> writes:
 Quote: Hello, I have got a porblem with Matlab. I would like to find out, which numbers of a vector agree with an interval. Example: A = [4; 5; 6]; I will compare A with an interval of 90% - 110% around the vector B B = [3.2; 5.05; 4.06] I would like to have now the result that the second line a correct Ergbenis ejects. Either logically or indexes. Can someone help me? Thank you in advance! Greetings your Christian

what do you want really? what is a 90%-110% interval around a vector?

do you mean this (everthing assumed to be >0 here)

blow(1)=0.9*min(B);
bup(1)=1.1*max(B);
blow(2)=0.9*max(B);
bup(2)=1.1*max(B);
k=0;
ind=[];
for i=1:n
if (a(i)-blow(1))*(bup(1)-a(i))>=0 || (a(i)-blow(2))*(bup(2)-a(i))>=0
k=k+1;
ind(k)=i;
end
end

????
hth
peter

 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 Page 1 of 1 [2 Posts]
 The time now is Tue Feb 19, 2019 5:42 am | All times are GMT
 Jump to: Select a forum-------------------Forum index|___Science and Technology    |___Math    |   |___Research    |   |___num-analysis    |   |___Symbolic    |   |___Combinatorics    |   |___Probability    |   |   |___Prediction    |   |       |   |___Undergraduate    |   |___Recreational    |       |___Physics    |   |___Research    |   |___New Theories    |   |___Acoustics    |   |___Electromagnetics    |   |___Strings    |   |___Particle    |   |___Fusion    |   |___Relativity    |       |___Chem    |   |___Analytical    |   |___Electrochem    |   |   |___Battery    |   |       |   |___Coatings    |       |___Engineering        |___Control        |___Mechanics        |___Chemical

 Topic Author Forum Replies Last Post Similar Topics help on problem brb003 Math 0 Mon Aug 28, 2006 3:31 am fraction problem mikerule Research 0 Thu Aug 24, 2006 5:10 am Mod computer problem William Elliot Math 4 Fri Jul 21, 2006 12:07 pm Divine apparitions in the tethered goat problem? jpalmour@gmail.com Math 6 Thu Jul 20, 2006 8:26 pm possible to use Generalized Method of Moments for this pr... comtech Math 1 Thu Jul 20, 2006 12:49 am