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;
...
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...
약 4년 전
해결됨
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:...
약 4년 전
질문
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 = ...
약 4년 전 | 답변 수: 2 | 0
2
답변
질문
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 ...
약 4년 전 | 답변 수: 1 | 0
1
답변
질문
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;
...
4년 이상 전 | 답변 수: 1 | 0
1
답변
질문
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...
5년 이하 전 | 답변 수: 1 | 0
1
답변
질문
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?')
...
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.