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

quasi 7 anni fa | 0

Domanda


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

quasi 7 anni fa | 4 risposte | 0

4

risposte

Domanda


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

quasi 7 anni fa | 2 risposte | 0

2

risposte

Domanda


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

quasi 7 anni fa | 0 risposte | 0

0

risposte

Domanda


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

quasi 7 anni fa | 0 risposte | 1

0

risposte

Domanda


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

quasi 7 anni fa | 1 risposta | 0

1

risposta

Domanda


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

quasi 7 anni fa | 2 risposte | 0

2

risposte

Domanda


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

quasi 7 anni fa | 1 risposta | 0

1

risposta

Domanda


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

quasi 7 anni fa | 2 risposte | 0

2

risposte

Domanda


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

quasi 7 anni fa | 3 risposte | 0

3

risposte