24小时热门版块排行榜    

查看: 829  |  回复: 2

轻铃molly

铜虫 (小有名气)

[求助] 怎样在origin里面显示切点的坐标?

8.5版本的,画出了拟合好的曲线和某一点的切线,怎样把切点坐标显示出来?求指教。谢谢!

» 收录本帖的淘帖专辑推荐

Origin-数据处理

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

eurekayan

荣誉版主 (知名作家)

三沙市名誉市长兼书记

优秀版主

【答案】应助回帖

轻铃molly(金币+1): 不是很明白,不过还是谢谢了~! 2011-10-15 16:29:10
重建一列,然后set  as label,读出切点值输入
xps
2楼2011-10-13 15:46:59
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

FANXH1987

木虫 (著名写手)

SLS

【答案】应助回帖

轻铃molly(金币+1): 试了一下,只弹出一个Attention的对话框,不知道是不是因为我同时有多条切线的原因。谢谢你了! 2011-10-15 16:46:16
做出了切线和拟合的曲线,那就应该有两条线了,可以用originlab提供的一个Lab talk来实现
具体过程:
1.将下面的代码保存为custom.ogs,然后替换origin安装原始位置文件夹里的custom.ogs(不放心可以先保留一个备份)
代码:
// Filename:  Custom.ogs
// Purpose: The Custom Routine button on the standard toolbar will use this code, by calling
// the [Main] section
// Modifications:
[main]

run.section(,init);
run.section(,getdatasets);
run.section(,intersect);

[init]

//////////////////////////////
// Initialize all Variables //
//////////////////////////////

i=1; // init i in getnum
j=2; // init j in getnum

%Z=""; // init %Z to nothing

aa1=1E270; // init aa1 (will hold y int for 1st fit)
bb1=1E270; // init bb1 (will hold slope for 1st fit)

aa2=1E270; // init aa2 (will hold y int for 2nd fit)
bb2=1E270; // init bb2 (will hold slope for 2nd fit)

xint=1E270; // init xint (will hold final x intersection value
yint=1E270; // init yint (will hold final y intersection value

%L=""; // string variable used for intersection label on graph

[getdatasets]

//////////////////////////////
// Get Datasets From User   //
//////////////////////////////

// compile list of available datasets in %Z

doc -e D
{
%Z=%Z %C; // create a list of datasets for getnum by looping
};

// execute getnum to obtain names of curves to compare

getnum
(Dataset 1) i:Z
(Dataset 2) j:Z
(Select Datasets);

[intersect]

/////////////////////////////////////////////
// Calculate and Report Intersection (X,Y) //
/////////////////////////////////////////////

// perform linear regressions on selected datasets
// and calculate the x intersection value and its y value

stat.data$=%[%Z,#i]; // assigns 1st selected dataset for lin reg
stat.lr(); // performs lin reg on 1st selected dataset

aa1=stat.lr.a; // assigns 1st y intercept val to aa1
bb1=stat.lr.b; // assigns 1st slope val to bb1

stat.data$=%[%Z,#j]; // assigns 2nd selected dataset for lin reg
stat.lr(); // performs lin reg on 2nd selected dataset

aa2=stat.lr.a; // assigns 2nd y intercept val to aa2
bb2=stat.lr.b; // assigns 2nd slope val to bb2

xint=(aa2-aa1)/(bb1-bb2); // calculates x intersection value
yint=aa1+(bb1*xint); //calculates corresponding y intersection value

%L="Intersection at: ($(xint), $(yint))";
type %L;
label -a (xint-5) yint -s -n intersection %L;

2.在graph窗口下点击那个类似offie宏默认图标的标签(三个矩形加中间一个菱形的标签,如果没有,在view-tools bar-button group - standard里可以找到,标签提示是:run custom.ogs···,这个标签是用来启用Custom.ogs文件里的内容的,和office自定义宏的用法很像)
3.在弹出的对话框里选择数据源,然后OK
测试只有一个交点时可以实现显示交点,几个交点的情况就不知道了,有个不好的地方时这个lab选择数据好像只能选择整个数据曲线,要是能像date selected功能可以随意选择就好了~~~
你试一下吧!应该可以的(不行也可以给origin增加这个功能,呵呵),祝你成功
有限空间,无限价值!
3楼2011-10-14 15:46:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 轻铃molly 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 关于代码变化问题,想知道的进来 +15 且听虎啸 2026-08-07 22/1100 2026-08-09 22:13 by 布布和一二
[基金申请] 这样的filecode谁见过 +10 布布和一二 2026-08-08 21/1050 2026-08-09 17:21 by 天神眷顾
[基金申请] fileCode有新解读? +10 Tide man 2026-08-08 18/900 2026-08-09 12:55 by 仁砚薪传
[基金申请] 关于filecode,很负责任的告诉大家 +6 爱看书的可乐 2026-08-08 7/350 2026-08-08 22:13 by a_niu
[考博] 【2027博士申请】纳米药物递送方向 20+3 13586093586 2026-08-03 5/250 2026-08-08 21:54 by 13586093586
[基金申请] 关于豆爷回答的JTJC与%2F数量 +5 yang182083 2026-08-06 7/350 2026-08-08 18:29 by zhanghaozhu
[基金申请] 国基金的申报应该改成非等额制,评价高的钱多评价低的钱少,但是增加资助率 +7 a089 2026-08-07 7/350 2026-08-08 18:05 by gltch
[基金申请] 基金中了 +14 laoda193707 2026-08-06 14/700 2026-08-08 00:23 by 实验小白ha
[基金申请] 关于filecode +4 布布和一二 2026-08-07 7/350 2026-08-07 22:55 by zhanghaozhu
[基金申请] 娱乐 +6 Tide man 2026-08-03 6/300 2026-08-07 22:40 by 铁帽子农民
[基金申请] 固定端突然变了,今天 +6 archvillain 2026-08-06 10/500 2026-08-07 16:03 by 医学老男孩
[基金申请] 听说今天filecode变了 +24 布布和一二 2026-08-06 47/2350 2026-08-07 16:02 by zhiyanjiang
[基金申请] filecode变化情况 +6 布布和一二 2026-08-07 22/1100 2026-08-07 14:45 by 且听虎啸
[基金申请] 大家散了吧,后缀研究没有意义,别浪费时间了,过好目前的每一天,不要焦虑 +5 Tide man 2026-08-06 7/350 2026-08-07 13:11 by 医学老男孩
[基金申请] filecode +14 等待解的谜 2026-08-06 19/950 2026-08-07 12:20 by wlwhappy
[基金申请] 求各位大神看下 100+6 hpkpkpkp 2026-08-05 33/1650 2026-08-06 14:49 by zhiyanjiang
[基金申请] 8月时间戳变的,举个手。玩一下,释放压力 +9 archvillain 2026-08-04 11/550 2026-08-05 20:06 by wlwhappy
[基金申请] 好消息?这个有何含义??? +8 Tide man 2026-08-05 10/500 2026-08-05 16:14 by xmuxiaoyu
[基金申请] 有没有H口的?有收到消息的吗? +3 超级海虾 2026-08-04 3/150 2026-08-04 17:26 by 学教育滴
[基金申请] 纯娱乐,不喜欢勿喷 +7 Tide man 2026-08-04 10/500 2026-08-04 15:10 by loufangrui
信息提示
请填处理意见