作业帮 > 综合 > 作业

matlab里面求导函数

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/30 14:02:26
matlab里面求导函数
a0=0.00085;
v=6357.5:0.01:6358.4;
y=a0./(1+((v-6358)/0.01736).^2);
f=diff(y,1);plot(v,f)
但是为什么画不出俩 提示
Error using ==> plot
Vectors must be the same lengths.
把plot里面的v去掉就可以,但是我想画出一个图像的横坐标是v的那个图形.问题出现在哪里呢 我是新手
你给的那个程序不行啊 Error using ==> mpower
Matrix must be square.
clear;clc
a0=0.00085;
v=6357.5:0.01:6358.4;
y=a0./(1+((v-6358)/0.01736).^2);
f=diff(y,1);
plot(v(2:end),f)