필터 지우기
필터 지우기

how can i make a function choose?

조회 수: 1 (최근 30일)
Mahmoud Sami
Mahmoud Sami 2018년 4월 19일
댓글: Mahmoud Sami 2018년 4월 27일

If i had

DN= [[0.125 0.25 0.375 0.5 0.75 1 1.25 1.5 2 2.5];
OD=[0.405 0.540 0.675 0.84 1.05 1.315 1.66 1.9 2.375 2.875];
t=[0.068 0.088 0.091 0.109 0.113 0.133 0.14 0.145 0.154	0.203];

the above 3 matrix have the same no. of variables. and V varies from 1.5 to 3

ID = sqrt(4.*Q.* 0.000011574074./(pi.*V));
OD = ID + 2.*t;

and i need the OD function choose a the next large number from matrix above. Then align ID , t , DN with it.

  댓글 수: 11
Jan
Jan 2018년 4월 21일
@Mahmoud Sami: I do not have any idea of what "ASME standard" is. I do not understand the meaning of the other sentences of your comment also. Again: What is the wanted output for the given example input?
Mahmoud Sami
Mahmoud Sami 2018년 4월 21일
if i have F=[OD ID' t' DN'] as above comment I need 4 variables in that matrix with condition for V (1.5 :3 )

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 21일
"and i need the OD function choose a the next large number from matrix above. "
interp1() with the 'next' option.
  댓글 수: 8
Walter Roberson
Walter Roberson 2018년 4월 27일
adjusted_OD = OD(bin);
adjusted_DN = DN(bin);
adjusted_t = t(bin);
Mahmoud Sami
Mahmoud Sami 2018년 4월 27일
Thanks alot.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by