matlab画图出错R=5;r=2;c=5*exp(i*t);c1=3*exp(i*t)+2*exp(i*(-5*t/2+t)); c2=3*exp(i*t)+2*exp(i*(pi+5*t/2+t)); p=plot(real(c),imag(c));p1=plot( real(c1),imag(c1));p2=plot(real(c2),imag(c2));for t=linspace(0,4*pi,1000)set(p1,'xdata',real(c),'ydata',im

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 22:12:58
matlab画图出错R=5;r=2;c=5*exp(i*t);c1=3*exp(i*t)+2*exp(i*(-5*t/2+t)); c2=3*exp(i*t)+2*exp(i*(pi+5*t/2+t)); p=plot(real(c),imag(c));p1=plot( real(c1),imag(c1));p2=plot(real(c2),imag(c2));for t=linspace(0,4*pi,1000)set(p1,'xdata',real(c),'ydata',im
xnF_0XYq.N%fn sHld״k@0 M  64K^2(ZgCΙs>n!`m^~j'EU5s?/ekE`?DfYZ/jBI$Ӽ.J#%Ur5D0i r4|ʶ;A6V7ʔ@Y)J9 WkQpZq$Κ5ى?\TМ Th^9;bެ^^_~Lu ]JX۵~=wڻ8ys89Fm_̽;w;]w0

matlab画图出错R=5;r=2;c=5*exp(i*t);c1=3*exp(i*t)+2*exp(i*(-5*t/2+t)); c2=3*exp(i*t)+2*exp(i*(pi+5*t/2+t)); p=plot(real(c),imag(c));p1=plot( real(c1),imag(c1));p2=plot(real(c2),imag(c2));for t=linspace(0,4*pi,1000)set(p1,'xdata',real(c),'ydata',im
matlab画图出错
R=5;r=2;c=5*exp(i*t);c1=3*exp(i*t)+2*exp(i*(-5*t/2+t)); c2=3*exp(i*t)+2*exp(i*(pi+5*t/2+t)); p=plot(real(c),imag(c));p1=plot( real(c1),imag(c1));p2=plot(real(c2),imag(c2));for t=linspace(0,4*pi,1000)set(p1,'xdata',real(c),'ydata',imag(c));set(p2,'xdata',real(c1),'ydata',imag(c1));set(p3,'xdata',real(c2),'ydata',imag(c2));drawnow;end;
提示 Invalid handle object.,

matlab画图出错R=5;r=2;c=5*exp(i*t);c1=3*exp(i*t)+2*exp(i*(-5*t/2+t)); c2=3*exp(i*t)+2*exp(i*(pi+5*t/2+t)); p=plot(real(c),imag(c));p1=plot( real(c1),imag(c1));p2=plot(real(c2),imag(c2));for t=linspace(0,4*pi,1000)set(p1,'xdata',real(c),'ydata',im

程序中有几个错误:

(1)for循环应该写在计算c,c1,c2中,并按照向量存储

(2)其实画实部虚部只要plot(c)即可


程序在附件中


结果图如下:


matlab画图出错R=5;r=2;c=5*exp(i*t);c1=3*exp(i*t)+2*exp(i*(-5*t/2+t)); c2=3*exp(i*t)+2*exp(i*(pi+5*t/2+t)); p=plot(real(c),imag(c));p1=plot( real(c1),imag(c1));p2=plot(real(c2),imag(c2));for t=linspace(0,4*pi,1000)set(p1,'xdata',real(c),'ydata',im matlab解微分方程出错?iiiiii?il =- (8*C^2*R^4*i - 2*C*L*R^2*i + (2*C*L^2*R^2*i)/(L^2 - 4*C*L*R^2)^(1/2) - (8*C^2*L*R^4*i)/(L^2 - 4*C*L*R^2)^(1/2))/(exp((t*(L + (L^2 - 4*C*L*R^2)^(1/2)))/(2*C*L*R))*(16*C^2*R^4 - 4*C*L*R^2)) - (8*C^2*R^4*i - 2*C* {an}是一个数列,a n+1 = r(1- an)an ,a0=0.1,当r取不同值时,用matlab画图matlab画图 MATLAB 中r=2. matlab编程 出错 clcG=6.672*10^-11,q=1000;r =[4:4:20;0:4:16]h=[1:1:5;2:2:10]for c=1:length(4:4:20),a=1:length(1:1:5)for b=1:length(2:2:10)g=2.*pi.*G.*q.*(r(1,c)-r(2,c)+sqrt(r(1,c).^2+h(a,b).^2)-sqrt(r(2,c).^2+h(a,b).^2))endc=c+1,a=a+1;end 在用matlab画图时出不来图,帮忙看看是不是语句错了,求指导,x=0;2.5;要表示现在0~2,.5的区间里r=(10^(-5)*(((1-x)/15).^2-0.696).^0.5)plot(x,r) Matlab计算程序问题用MATLAB编了一段计算程序,如下:clearR=1969;r=60;d=1587.5;a=asin((d+r)/R);b=asin((d-r)/R);c=R*cos(a);d=R*cos(b);z=[c+11.75:3.5:d];m=acos(z/R);e=sin(m);n=asin(((R*e).^2+d.^2-r.^2)/(2*R*d*e));x=R*cos(n)*sin(m);y=R*sin 用matlab画如下式子的图像!应该怎样写程序?R=2*r.*sin(acos((r^2+(r+h).^2-R.^2./4)./(2*r.*(r+h))))./cos(pi/180.*j+acos((r^2+(r+h).^2-R.^2./4)./(2*r.*(r+h)))); 其中r=6370,j=5,h=60:90 非常急, matlab程序中积分语句一直出错,求原因clear;clc;R0=55;R1=100;R2=25;Pa=0.1;Pd=0.6;Pv=0.1;for r=0:0.01:100if (R2>r&&r>=0)P=0.1;plot(r,P)hold onelseif(R0>=r&&r>=R2)P=sqrt(Pd^2-(Pd^2-Pv^2)*log(r/R0)/log(R2/R0));plot(r,P)F1=int(P,r,R2,R0)hold o MATLAB find函数 [r,c] = find(R == max(R(:))); thetap = theta(c(1)); matlab极坐标隐函数画图rsinθ-sinθ/2πr=C,当C=0,1,...,10时,所有曲线画在一个图内,求程序, R+R^2+R^3+R^4+R^5=0.85,R怎么计算 matlab符号函数画图我想画出一个t(R)的二维函数图~R的区间是(0,50^(-9)),这是我编的程序~但是结果老不对~syms R n1 n2 a h r k u1 u2 e1 e2f=6*R*(n1+h*(n2-n1)/(2*R))g=2*a*R-2*r*h-k/R-(h^1.5)*(R^0.5)/(0.75*((1-u1^2)/ matlab新手问题如果圆柱体的体积由其高 h 和半径 r 通过公式 V=2π(r^2)h 得到,使用 MATLAB 找出高12cm,直径 4cm的圆柱体所包含的体积.>>r=2;h=14;v=2*pi*(r^2)*h;v=哪出错了. 用matlab 求一元函数最值y=1/5*r*acos((r^2-1/2*((5325683144035133/2305843009213693952*r^2+21/5050*(50500*r^2-r^4)^(1/2)-9/5650*(56500*r^2-r^4)^(1/2))^2+(-1478907458814005/576460752303423488*r^2-4/2525*(50500*r^2-r^4)^(1/2)+11/2825*(56500*r^2-r^ matlab中要求向量n1和n2的叉乘,但n1中有个数组变量,所以cross(n1,n2)出错size不一样,theta=0:0.1*pi:2*pi;x=(r-t)*cos(theta);y=(r-t)*sin(theta);z=sqrt(R^2-((r-t).*sin(theta)-e).^2)./sin(alpha)-(r-t).*cos(theta)./tan(alpha) Matlab编程后没法画图是一个求导函数,程序编完后画图时候,显示Error using ==> plotVectors must be the same lengths.下面是程序:syms b L v k;d=50;p=5;v=d/360*p;L=v*t;r=250.893;m=492.002;X=734.551; c=12.0644;b=acos((r.^2+(X-L matlab中矩阵的使用比如r=【r