clear; %clear all variables from memoryclose all; %close all windowsclc; %clear command windowdisp('Wave Animation 1'); %display the title%INPUTS%wave parametersfrequency = 1e6;velocity = 3e3;%x parametersx_end = 3e-02;%TO BE ENTERED%x_step = 1.5e-04;%TO BE ENTERED%%time parameterst_step = 5e-08;%TO BE ENTERED%t_points = 100;%TO BE ENTERED%%PROGRAMx = [0 : x_step : x_end]; %make a vector of x positionst = [0 : t_step : t_step * t_points]; %make a vector of times%calculate w and k from inputsw = sym('pi*2e6');%TO BE ENTERED%k = sym('(2/3)*pi*1000');%TO BE ENTERED%figure(2);for jj=1:length(t)clf;m=zeros(1,201);[mx,mm]=meshgrid(x,m);mmx=sqrt(mx.^2+mm.^2);surf(mx,mm,cos(k*mmx-w*jj(t)));pause(0.01);end;
是什么原因啊,想畫一個cos函數的三維圖,然后能一幀一幀的沿X軸正向移動,請幫幫忙
12345678_0001
2023-04-20 19:15:08