質問

create function that displays fibonacci series

So, I have four goals here: the user will input the first two numbers of fibonacci series, and the length of the series (n). Fo...

4年弱 前 | 0 件の回答 | 0

質問

create function that displays fibonacci series

So, I have four goals here: the user will input the first two numbers of fibonacci series, and the length of the series (n). Fo...

4年弱 前 | 0 件の回答 | 1

質問

How to write exponential function that accepts vectors ?

So, say I want to write a function 's' for e^(10x) * e^(cosx) function value=s(x) value=exp(10*x)*exp(cos(x)) ; this ...

4年弱 前 | 1 件の回答 | 0

質問

switch case and inequalities

So, say I wanted to disp('that's impossible') if a user enters an age over 150 or less than 0? How could I do this for a swit...

4年弱 前 | 2 件の回答 | 0

質問

Why is this returning "logical 1"

This is my code: userAge = input('How old are you?'); if userAge >0 && userAge <7 disp('Oh that''s so cute!') ...

4年弱 前 | 1 件の回答 | 0

質問

Why doesn't this command work (vector addition)?

for x=1:0.5:10 y(x) = x + 1 end Why doesn't this above command work, but the one below does? What is it about the "0.5...

4年弱 前 | 2 件の回答 | 0

質問

How does this code sum the first 100 even integers?

n=200; sum=0; for ctr=0:1:n if mod(ctr,2)==0 sum = sum+ctr; end end disp(sum) Apparently t...

4年弱 前 | 3 件の回答 | 0