matlab运行 >> x=1:0.01:200; >> a=max(x);出现Subscript indices must either be real positive integers orlogicals.程序明显没有问题,在2012b上可以运行,系统版本2010b

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 10:35:54
matlab运行 >> x=1:0.01:200; >> a=max(x);出现Subscript indices must either be real positive integers orlogicals.程序明显没有问题,在2012b上可以运行,系统版本2010b

matlab运行 >> x=1:0.01:200; >> a=max(x);出现Subscript indices must either be real positive integers orlogicals.程序明显没有问题,在2012b上可以运行,系统版本2010b
matlab运行 >> x=1:0.01:200; >> a=max(x);
出现
Subscript indices must either be real positive integers orlogicals.
程序明显没有问题,在2012b上可以运行,系统版本2010b

matlab运行 >> x=1:0.01:200; >> a=max(x);出现Subscript indices must either be real positive integers orlogicals.程序明显没有问题,在2012b上可以运行,系统版本2010b
我用2012a也没问题啊.你clear一下试试.
下标索引必须是正整数类型或者逻辑类型,这个提示和你的语句关系不大呀.

matlab运行 >> x=1:0.01:200; >> a=max(x);出现Subscript indices must either be real positive integers orlogicals.程序明显没有问题,在2012b上可以运行,系统版本2010b matlab画函数x=-0.6:0.01:0.6;y=3.43*((x/2)*sqrt(0.36-x^2)+0.18*asin(x/0.6));plot(x,y)这个运行不了, matlab 运行下面的程序出现一些错误,请帮忙看看错误在哪里,谢谢.程序syms x n mn=0;m=1377*10^6;x=0.1:0.01:6;f(x)=(x.*19.1*300*300*pi.*(1-(sin(2*pi.*x))/(2*pi.*x))-n)/((3*x-1.25)*360);plot(x,f(x))运行出错? Subscript indices m matlab解常微分方程MATLAB解常微分方程运行中创建xprim2,将此函数保存在M文件xprim2.m中:function xprim=xprim2(t,x)xprim=[x(1)-0.1*x(1)*x(2)+0.01*t;-x(2)+0.02*x(1)*x(2)+0.04*t];然后调用一个ODE算法和画出解的图形 matlab 计算定积分怎么运行很慢,我的程序如下:syms x S2=sqrt(1+(1.767*x^2-3.68*x+2.74 MATLAB中plot函数用法MATLAB中输入>> x=1:0.1:3f=sin(x)*(1+x)*log(1+x);plot(x,f)运行出错?Error using ==> mtimesInner matrix dimensions must agree.如果改成>> x=1:0.1:3f=sin(x).*(1+x).*log(1+x);plot(x,f)运行正确,可以绘出图形来. 这是一个matlab程序,为什么这个程序只运行else后面的语句,x=-2*pi:0.01:2*pi;if x matlab中求最小值f=@(x)(-exp(x));M=fminbnd(f,0,1);运行出来为什么结果不是-e 而是0.9999呢? 【急】有关MATLAB的相关问题程序非常简短和简单,而且在别的电脑上能运行,为什么换个电脑(MATLAB版本也不一样了),就不能运行了呢?程序如下:function dx=cx3(t,x)dx=[x(2)+sin(x(1))x(1)-x(2)+sin(x(2))x(4 已知函数,求用matlab作函数曲线(1)t=0:0.01:30;y=0.1651*(exp(-2.3*(1.2-t/18.7505)^2)));plot(t,y)点击Run ,运行失败,不显示(2)x=1000:0.1:5000;y=0.17/2378*(exp(1-x/2378));figureplot(x,y);点击Run ,运行失败,不显示这是为 matlab 中 运行:[x]=solve('90-atan(0.1*x)-atan(0.2*x)=51) 为什么不行啊? matlab运行syms x;s=solve(x^3+cos(x)) 为什么结果总是[ empty sym ]啊, matlab 运行错误,clear all;clcglobal p x p=101325;x0=[0.3 0.3 0.4];[t,x]=ode45(@justice,[0:0.01:100],x0);plot(x(:,1),x(:,2))hold on%function dxdt=justice(t,x)global xtempx=x./sum(x);xtemp=x;T2=fzero(@sumy,300)psat=antione(T2);gamma=wilson(x,T2);k= matlab高手来.设信号x(n)={1,2,3,4,5,3,3,3}.分别将其以5.8.12为周期进行周期延拓,给出6个周期.求matlab运行代码. function f=fun(x); f=100*(x(2)-x(1)^2)^2+(1-x(1))^2; x=[1 2] fun(x)在MATLAB中运行后总出错? 用matlab求极限用MATLAB求(x^2+1)/(x^2-1)的极限,程序咋写,我写的运行出来是NaN.当x趋于1的时候求极限,运行出来是NaN 用matlab绘制y=sin(x)*cos(x)我的程序如下x=0:1:40;y=sin(x)*cos(x);plot(x,y)为什么运行会出错,求指教 在matlab中运行如下程序:x = 0:1:10; y = x.^2-10*x+15; plot(x,y);为什么x后面有一小点:(x.^2);这一小点有什么意义?