Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Impossible to execute this function
Replies: 3   Last Post: Jun 13, 2013 9:28 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Abel

Posts: 31
Registered: 5/29/13
Impossible to execute this function
Posted: Jun 13, 2013 3:02 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

I have a probleme I can't solve : here is the function I use :

function [Dref, Fref]=reflux_3(evenements_inter_Im123_liquide,evenements_Imp1_liquide,evenements_Imp2_liquide,evenements_Imp3_liquide)
nbreflux=0;

if isempty(evenements_inter_Im123_liquide)
disp('vide');
Dref=[];
Fref=[];
else
for i=1:size(evenements_inter_Im123_liquide,1)


X1=find(evenements_Imp1_liquide(:,1)<= evenements_inter_Im123_liquide(i,1));
D1=X1(end);
DD1=evenements_Imp1_liquide(D1,1);
FF1=evenements_Imp1_liquide(D1,2);
X2=find(evenements_Imp2_liquide(:,1)<= evenements_inter_Im123_liquide(i,1));
D2=X2(end);
DD2=evenements_Imp2_liquide(D2,1);
FF2=evenements_Imp2_liquide(D2,2);
X3=find(evenements_Imp3_liquide(:,1)<= evenements_inter_Im123_liquide(i,1));
D3=X3(end);
DD3=evenements_Imp3_liquide(D3,1);
FF3=evenements_Imp3_liquide(D3,2);
if((DD3>=DD2) & (DD2>=DD1))
nbreflux=nbreflux+1;
Dref(nbreflux,1)=DD1;
Dref(nbreflux,2)=DD2;
Dref(nbreflux,3)=DD3;
Fref(nbreflux,1)=FF1;
Fref(nbreflux,2)=FF2;
Fref(nbreflux,3)=FF3;
end

clear X1 D1 DD1 FF1 D2 DD2 FF2 X3 D3 DD3 FF3
end
end

Dref;
Fref;
A=0;


Then try it like that with the vectors you can get from sendspace below :

[Dreflux_234_melange, Freflux_234_melange]=reflux_3(evenements_inter_Imp234_melange,evenements_Imp2_melange,evenements_Imp3_melange,evenements_Imp4_melange);

vectors to be used : http://www.sendspace.com/file/ar34ik

Then you will normally get this message :

??? Undefined function or variable "Dref".

Error in ==> reflux_3 at 47
Dref;


I think it is due to the if condition but I don't manage to solve it and to understand why it is caused.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.