如何用MATLAB编写六元一次方程组这是我编的程序,但是不对a=2.578b=40s=82XA=a*(cos(s)+(pi/180)*(s+b)*sin(s))YA=a*(sin(s)-(pi/180)*(s+b)*cos(s))XB=a*(cos(s+180)+(pi/180)*(s+180-b)*sin(s+180))YB=a*(sin(s+180)-(pi/180)*(s+180-b)*cos(s+
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 14:41:13
如何用MATLAB编写六元一次方程组这是我编的程序,但是不对a=2.578b=40s=82XA=a*(cos(s)+(pi/180)*(s+b)*sin(s))YA=a*(sin(s)-(pi/180)*(s+b)*cos(s))XB=a*(cos(s+180)+(pi/180)*(s+180-b)*sin(s+180))YB=a*(sin(s+180)-(pi/180)*(s+180-b)*cos(s+
如何用MATLAB编写六元一次方程组
这是我编的程序,但是不对
a=2.578
b=40
s=82
XA=a*(cos(s)+(pi/180)*(s+b)*sin(s))
YA=a*(sin(s)-(pi/180)*(s+b)*cos(s))
XB=a*(cos(s+180)+(pi/180)*(s+180-b)*sin(s+180))
YB=a*(sin(s+180)-(pi/180)*(s+180-b)*cos(s+180))
[R1,R2,XO1,X02,YO1,YO2]=solve('(XO1-XA)^2+(YO1-YA)^2=R1^2','YO1=(a-X01*cos(s))/sin(s)','(XO2-XB)^2+(YO2-YB)^2=R2^2','YO2=-1*(a+X02*cos(s))/sin(s)','R2=R1+(180-2*b)*(PI/180)*a','R1+R2=sqrt((XO1-XO2)^2+(YO1-YO2)^2)','R1','R2','XO1','XO2','YO1','YO2')
错误提示
Configuration:
MATLAB Version:6.5.0.180913a (R13)
Operating System:Microsoft Windows XP
Window System:Version 5.1 (Build 2600:Service Pack 3)
Processor ID:x86 Family 15 Model 12 Stepping 2,AuthenticAMD
Virtual Machine:Java 1.3.1_01 with Sun Microsystems Inc.Java HotSpot(TM) Client VM
(mixed mode)
Register State:
EAX = 162e7638 EBX = 00000000
ECX = 00000101 EDX = 1ac403d8
ESI = 1ac403d8 EDI = 1ac403d8
EBP = 00dfa238 ESP = 00dfa1fc
EIP = 1630a001 FLG = 00010246
Stack Trace:
[0] mapleoem.dll:0x1630a001(0x1ac403d8,4,0x16309e9f,0x1ac403d8)
This error was detected while a MEX-file was running.If the MEX-file
is not an official MathWorks function,please examine its source code
for errors.Please consult the External Interfaces Guide for information
on debugging MEX-files.
If it is an official MathWorks function,please
follow these steps in reporting this problem to The MathWorks so
that we have the best chance of correcting it:
1.Send this crash report to segv@mathworks.com for automated analysis.
For your convenience,this information has been recorded in:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\matlab_crash_dump.2572
2.Also,if the problem is reproducible,send the crash report to
support@mathworks.com along with:
- A specific list of steps that will reproduce the problem
- Any M,MEX,MDL or other files required to reproduce the problem
- Any error messages displayed prior to this crash report
A technical support engineer will contact you with further information.
Thank you for your assistance.Please save your workspace and restart
MATLAB before continuing your work.
Error in ==> D:\ruanjiananzhuang\toolbox\symbolic\maplemex.dll
Error in ==> D:\ruanjiananzhuang\toolbox\symbolic\maple.m
On line 116 ==> [result,status] = maplemex(statement);
Error in ==> D:\ruanjiananzhuang\toolbox\symbolic\solve.m
On line 65 ==> maple('_EnvExplicit := true;');
Error in ==> D:\ruanjiananzhuang\work\Untitled2.m
On line 11 ==> [R1,R2,XO1,X02,YO1,YO2]=solve('(XO1-XA)^2+(YO1-YA)^2=R1^2','YO1=(a-X01*cos(s))/sin(s)','(XO2-XB)^2+(YO2-YB)^2=R2^2','YO2=-1*(a+X02*cos(s))/sin(s)','R2=R1+(180-2*b)*(PI/180)*a','R1+R2=sqrt((XO1-XO2)^2
>>
如何用MATLAB编写六元一次方程组这是我编的程序,但是不对a=2.578b=40s=82XA=a*(cos(s)+(pi/180)*(s+b)*sin(s))YA=a*(sin(s)-(pi/180)*(s+b)*cos(s))XB=a*(cos(s+180)+(pi/180)*(s+180-b)*sin(s+180))YB=a*(sin(s+180)-(pi/180)*(s+180-b)*cos(s+
我粘贴了你的那段 程序 放在M文件里运行,好半天 给出来 一堆quit:
和几个错误,好像是最后一行有毛病,算不下去了
.
.
.
.
.
Quit:
Quit:
Quit:
Quit:
Quit:
Quit:
Error in ==> maple at 113
[result,status] = maplemex(statement);
Error in ==> solve at 119
[R,stat] = maple('solve',eqns,vars);
Error in ==> fff at 8
[R1,R2,XO1,X02,YO1,YO2]=solve('(XO1-XA)^2+(YO1-YA)^2=R1^2','YO1=(a-X01*cos(s))/sin(s)','(XO2-XB)^2+(YO2-YB)^2=R2^2','YO2=-1*(a+X02*cos(s))/sin(s)','R2=R1+(180-2*b)*(PI/180)*a','R1+R2=sqrt((XO1-XO2)^2
>>
我用3G内存的机器,弄完了,MATLAB2006a 占了1.8G内存
你换个MATLAB版本,代码可能有毛病,上面两位已经给了,好像比你写的多好几行