Beantwortet
How can I tell if this is stored as a vector?
Wow, thank you so much! I wouldn't have thought it would be as simple as taking off a semicolon & the output argument. I thought...

etwa 6 Jahre vor | 0

Frage


Sum of row and column #?
Say I ask the user to input the size of a square matrices, n. And say I want each element of this matrix to be the sum of the...

etwa 6 Jahre vor | 4 Antworten | 0

4

Antworten

Frage


How can I tell if this is stored as a vector?
Basically, I created a function, which contains the following (along with some other stuff): Lala= myfunction(a,b,n) ... ...

etwa 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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...

etwa 6 Jahre vor | 0 Antworten | 0

0

Antworten

Frage


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...

etwa 6 Jahre vor | 0 Antworten | 1

0

Antworten

Frage


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 ...

etwa 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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...

etwa 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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!') ...

etwa 6 Jahre vor | 1 Antwort | 0

1

Antwort

Frage


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...

etwa 6 Jahre vor | 2 Antworten | 0

2

Antworten

Frage


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...

etwa 6 Jahre vor | 3 Antworten | 0

3

Antworten