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?
Thank you in advance!
Greetings your Christian 

Back to top 


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



In article <1152739300.172732.96820@p79g2000cwp.googlegroups.com>,
"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 

Back to top 


Google


Back to top 



The time now is Sun Sep 23, 2018 8:23 pm  All times are GMT

