Feeds
提问
I'm trying to plot a graph with if than statements but keep getting the error "Array indices must be positive integers or logical values."
function x= HW2Problem1(y) x=1:.001:10; n=length(x); for i=(0:n) if x(i)==0 y(i)=16.67; elseif 0<x(i) & x(i)<5 y(i)=2...
1 year 前 | 1 个回答 | 0
