24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 644  |  回复: 13
当前主题已经存档。

bib96356

金虫 (正式写手)

[交流] 【求助】这个程序有什么问题,要怎么修改,求助高手

>> phi1=0:1:2;
>> phi2=0;
>> bigphi=0;
>> phi1=phi1*pi/180
bigphi=bigphi*pi/180
phi2=phi2*pi/180
B(1,1)=cos(phi1)*cos(phi2)-sin(phi1)*sin(phi2)*cos(bigphi)
B(1,2)=sin(phi1)*cos(phi2)+cos(phi1)*sin(phi2)*cos(bigphi)
B(1,3)=sin(phi2)*sin(bigphi)
B(2,1)=-cos(phi1)*sin(phi2)-sin(phi1)*cos(phi2)*cos(bigphi)
B(2,2)=-sin(phi1)*sin(phi2)+cos(phi1)*cos(phi2)*cos(bigphi)
B(2,3)=cos(phi2)*sin(bigphi)
B(3,1)=sin(phi1)*sin(bigphi)
B(3,2)=-cos(phi1)*sin(bigphi)
B(3,3)=cos(bigphi)
回复此楼

» 猜你喜欢

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

mopsite

木虫 (著名写手)

具体干嘛的 有什么用处 都不交待  怎么改阿
2楼2009-07-31 16:53:30
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

change0618

铁杆木虫 (著名写手)

方丈大师

板凳。。。。。。。。。。。
3楼2009-07-31 17:59:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

change0618

铁杆木虫 (著名写手)

方丈大师

phi1=0:1:2是一个向量,而你的B(1,1)等均是一个元素,所以维数不对。
另外用度数表示的三角函数,可以用sind, cosd, cotd, tand等表示,免除了转化为弧度的麻烦。
4楼2009-07-31 18:09:18
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

change0618

铁杆木虫 (著名写手)

方丈大师

phi1=2;
phi2=0;
bigphi=0;
B(1,1)=cosd(phi1)*cosd(phi2)-sind(phi1)*sind(phi2)*cosd(bigphi);
B(1,2)=sind(phi1)*cosd(phi2)+cosd(phi1)*sind(phi2)*cosd(bigphi);
B(1,3)=sind(phi2)*sind(bigphi);
B(2,1)=-cosd(phi1)*sind(phi2)-sind(phi1)*cosd(phi2)*cosd(bigphi);
B(2,2)=-sind(phi1)*sind(phi2)+cosd(phi1)*cosd(phi2)*cosd(bigphi);
B(2,3)=cosd(phi2)*sind(bigphi);
B(3,1)=sind(phi1)*sind(bigphi);
B(3,2)=-cosd(phi1)*sind(bigphi);
B(3,3)=cosd(bigphi);
disp(B)
5楼2009-07-31 18:17:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

change0618

铁杆木虫 (著名写手)

方丈大师

★ ★ ★ ★ ★ ★
woshilsh(金币+3,VIP+0):感谢,等待楼主确认 7-31 18:36
bib96356(金币+3,VIP+0): 7-31 21:40
phi1=0:1:2;
phi2=0;
bigphi=0;
B(1,1,: )=cosd(phi1)*cosd(phi2)-sind(phi1)*sind(phi2)*cosd(bigphi);
B(1,2,: )=sind(phi1)*cosd(phi2)+cosd(phi1)*sind(phi2)*cosd(bigphi);
B(1,3,: )=sind(phi2)*sind(bigphi);
B(2,1,: )=-cosd(phi1)*sind(phi2)-sind(phi1)*cosd(phi2)*cosd(bigphi);
B(2,2,: )=-sind(phi1)*sind(phi2)+cosd(phi1)*cosd(phi2)*cosd(bigphi);
B(2,3,: )=cosd(phi2)*sind(bigphi);
B(3,1,: )=sind(phi1)*sind(bigphi);
B(3,2,: )=-cosd(phi1)*sind(bigphi);
B(3,3,: )=cosd(bigphi);
disp(B)
6楼2009-07-31 18:23:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

bib96356

金虫 (正式写手)

>> phi1=0:1:2;

问题更复杂点,如果是这样,要怎么解决呢?
>> phi2=0;
>> bigphi=0:1:2;
>> phi1=phi1*pi/180
bigphi=bigphi*pi/180
phi2=phi2*pi/180
B(1,1)=cos(phi1)*cos(phi2)-sin(phi1)*sin(phi2)*cos(bigphi)
B(1,2)=sin(phi1)*cos(phi2)+cos(phi1)*sin(phi2)*cos(bigphi)
B(1,3)=sin(phi2)*sin(bigphi)
B(2,1)=-cos(phi1)*sin(phi2)-sin(phi1)*cos(phi2)*cos(bigphi)
B(2,2)=-sin(phi1)*sin(phi2)+cos(phi1)*cos(phi2)*cos(bigphi)
B(2,3)=cos(phi2)*sin(bigphi)
B(3,1)=sin(phi1)*sin(bigphi)
B(3,2)=-cos(phi1)*sin(bigphi)
B(3,3)=cos(bigphi)
7楼2009-07-31 21:43:04
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

bib96356

金虫 (正式写手)

有没有其他的方法实现这个问题呢?
8楼2009-07-31 21:50:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

bib96356

金虫 (正式写手)

自己顶啊
9楼2009-08-01 14:46:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

qllq1661

木虫 (职业作家)

说清楚程序的目的,这样大家也好下手
10楼2009-08-01 15:47:55
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 bib96356 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 一志愿太原理工安全工程300分,求调剂 +5 0857求调剂. 2026-03-24 6/300 2026-03-28 22:04 by zhq0425
[考研] 317分 一志愿南理工材料工程 本科湖工大 求调剂 +7 芋泥小铃铛 2026-03-28 7/350 2026-03-28 21:38 by 小木虫tim
[考研] 085602 化工专硕 338分 求调剂 +12 路痴小琪 2026-03-27 12/600 2026-03-28 15:41 by L135790
[考研] 286求调剂 +4 丢掉懒惰 2026-03-27 7/350 2026-03-28 08:07 by baoball
[考研] 315分求调剂 +7 26考研上岸版26 2026-03-26 7/350 2026-03-28 04:05 by fmesaito
[考研] 330一志愿中国海洋大学 化学工程 085602 有读博意愿 求调剂 +3 wywy.. 2026-03-27 4/200 2026-03-28 03:32 by fmesaito
[考研] 283求调剂(080500) +4 A child 2026-03-27 4/200 2026-03-27 15:34 by XPU李庆
[考研] 341求调剂 +7 青柠檬1 2026-03-26 7/350 2026-03-27 00:19 by wxiongid
[考研] 化学工程085602 305分求调剂 +17 RichLi_ 2026-03-25 17/850 2026-03-26 19:44 by plmuchong
[考研] 中国科学院深圳先进技术研究院-光纤传感课题组招生-中国科学院大学、深圳理工大学联培 +5 YangTyu1 2026-03-26 5/250 2026-03-26 18:27 by 猫咪猫咪呀
[考研] 085602 289分求调剂 +8 WWW西西弗斯 2026-03-24 8/400 2026-03-26 16:33 by 不吃魚的貓
[考研] 一志愿中南大学化学学硕0703总分337求调剂 +7 niko- 2026-03-22 7/350 2026-03-25 20:14 by qingfeng258
[考研] 296求调剂 +4 汪!?! 2026-03-25 7/350 2026-03-25 16:41 by 汪!?!
[考研] 302求调剂 +4 锦衣卫藤椒 2026-03-25 4/200 2026-03-25 16:29 by 功夫疯狂
[考研] 0854电子信息求调剂 324 +4 Promise-jyl 2026-03-23 4/200 2026-03-25 11:36 by Sugarlight
[考研] 一志愿武理085500机械专业总分300求调剂 +3 an10101 2026-03-24 7/350 2026-03-25 00:00 by 山鬼0-
[考研] 求调剂 +6 研研,接电话 2026-03-24 7/350 2026-03-24 17:01 by barlinike
[考研] 一志愿山东大学药学学硕求调剂 +3 开开心心没烦恼 2026-03-23 4/200 2026-03-24 00:06 by 开开心心没烦恼
[考研] 一志愿国科过程所081700,274求调剂 +3 三水研0水立方 2026-03-23 3/150 2026-03-23 23:11 by MajorWen
[考研] 接收2026硕士调剂(学硕+专硕) +4 allen-yin 2026-03-23 6/300 2026-03-23 15:04 by 汪!?!
信息提示
请填处理意见