photo

Mary Jeppson


Actif depuis 2016

Followers: 0   Following: 0

Statistiques

All
  • Thankful Level 3
  • Solver

Afficher les badges

Feeds

Afficher par

Question


While loop to calculate sine
I have written this code that settles on an incorrect value and I can't see what's wrong. Can anyone show me? x = pi/4; ...

plus de 7 ans il y a | 1 réponse | 0

1

réponse

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

plus de 7 ans il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

plus de 7 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

plus de 7 ans il y a

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

plus de 7 ans il y a

Question


Nested loops to estimate cos(pi/4)
I have written this code that is giving me an error: true = cos(pi/4); n = 2; es = .5^(2-n); x = pi/4; ea = 1; est = ...

plus de 7 ans il y a | 2 réponses | 0

2

réponses

Question


Convert base 2 to base 10 using loop
I've written this loop, but it produces a value of 128 for every number in the mult array instead of going from 128 to 64 to 32 ...

plus de 7 ans il y a | 1 réponse | 0

1

réponse

Question


maclaurin series code problem
I keep getting "index exceeds matrix dimensions" but i don't see a problem. Can anyone see why this isn't working? n = 4; ...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


matlab code for Euler's method
I have written this code for my class, but keep getting 'index exceeds matrix dimensions' can anyone tell me what's wrong with i...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


Problem with Fibonacci For loop
Here is my code: f(1) = input('What is the first number of the sequence?') f(2) = input('What is the second number?') ...

environ 8 ans il y a | 1 réponse | 1

0

réponse

Question


Problem adding components of a vector using a while loop
Can anyone tell me what's wrong with this code? x = [1 23 43 72 87 56 98 33]; b = 0; k = 1; while k<=length(x) ...

environ 8 ans il y a | 2 réponses | 0

2

réponses