interp2 -strictly monotomus increasing

Nm=[0.0366242038216561 0.256369426751592 0.671443736730361 1.03768577494692 1.58704883227176 2.00212314225053 2.53927813163482 2.91772823779193 3.40605095541401 3.84554140127389 4.37048832271762 4.84660297239915 5.31050955414013 5.70116772823779 6.07961783439491 6.32377919320595 6.45806794055202 6.51910828025478 6.55573248407643 6.48248407643312 6.40923566878981 6.33598726114650 6.26273885350318 6.21390658174098 6.14065817409767]
tm=[0.485833678632479 2.97491876894587 5.92553696834441 5.95681051392846 8.98528217489712 8.10274242779360 10.4015267390947 9.17522019607471 11.2522554584995 11.4037507008547 13.2569373682494 13.4685308941754 14.0861325375119 13.8739774388098 14.3517545727446 13.1898905990187 12.1320463219057 11.3801661360874 11.1561990863248 9.75845459943019 9.63848959401710 9.51852629230771 9.39856469430197 9.60254185941754 9.19863248363408]
data=xlsread("ss.xlsm");
rrpm=data(2:end,1);
ttorque=data(1,2:end);
epk_eff=data(2:end,2:end);
[ttorque,rrpm]=meshgrid(ttorque,rrpm)
eff_epk=interp2(ttorque,rrpm,epk_eff,tm,Nm);
%%excel sheet attached for eff_data

댓글 수: 4

Check this:
plot(ttorque,rrpm,'*r')
hold on
plot(tm,Nm,'*k')
The given points (tm, Nm) lies outside the given grid. So the error. Check your data or the logic.
Harish Vernekar
Harish Vernekar 2021년 3월 15일
the last time you helped me with same kind of answer here only efficiency data is changed other all are kept same.
Harish Vernekar
Harish Vernekar 2021년 3월 15일
this is previous one
torque = data(2:end,1);
rpm = data(1,2:end);
eff_epk = data(2:end,2:end);
Nm = [2^.5 exp(-1), pi, exp(2)]; % You'll have more sensible parameters here...
tm = [3 30 300 3000];
EPK_operating=interp2(rrpm,ttorque,eff_epk,Nm,tm);
Asvin Kumar
Asvin Kumar 2021년 3월 17일
편집: Asvin Kumar 2021년 3월 17일
It's unclear what you're trying to achieve or what problem you're facing.
Are you seeing any errors? Are you stuck somewhere? What's your question? For the community to help you better, please add descriptions of what you are trying to do.
Have a look at the doc page for interp2 on the 4th and 5th input arguments. You should either change the orientation of Nm or tm. Or you should create a meshgrid out of Nm and tm like you do for ttorque, rrpm.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2021년 3월 15일

편집:

2021년 3월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by