Community Profile

photo

ashutosh negi


Active since 2016

Followers: 0   Following: 0

Message

Statistics

Feeds

View by

Question


while running this simple matlab function program, it is showing error. please anyone spot the error. it is showing ,Error using myfact (line 3) Not enough input arguments.
function result= myfact(n,x) c =1; vec =[1:n]; c =[1,1./vec]; b =[1,x.^vec]; result =(c.*b); end

mer än 7 år ago | 1 answer | 0

1

answer

Question


Can anyone please explain the meaning of for m=1:size(x,1) & for n=1:size (x,2). in the program.please explain explicitly.
x=[0,-1,4;9,-14,25;-34,49,64]; for m=1:size(x,1) for n=1:size(x,2) if x(m,n)>=0 B(m,n)=sqr...

mer än 7 år ago | 2 answers | 1

2

answers

Question


when i am plotting this conditional for loop program no plot is showing only one dot is showing. Can anyone help me about how to display plot? i am using Matlab 2013..
% conditional x= -5:0.005:15; for k=1:length(x) if x(k)<0 y(k)=sqrt(x(k)^2+1); elseif x(k)<=10 ...

mer än 7 år ago | 1 answer | 0

1

answer