photo

TSmith


Last seen: 5 years ago Active since 2018

Followers: 0   Following: 0

Statistics

MATLAB Answers

8 Questions
0 Answers

RANK
79,646
of 301,432

REPUTATION
0

CONTRIBUTIONS
8 Questions
0 Answers

ANSWER ACCEPTANCE
87.5%

VOTES RECEIVED
0

RANK
 of 21,280

REPUTATION
N/A

AVERAGE RATING
0.00

CONTRIBUTIONS
0 Files

DOWNLOADS
0

ALL TIME DOWNLOADS
0

RANK

of 174,555

CONTRIBUTIONS
0 Problems
0 Solutions

SCORE
0

NUMBER OF BADGES
0

CONTRIBUTIONS
0 Posts

CONTRIBUTIONS
0 Public Channels

AVERAGE RATING

CONTRIBUTIONS
0 Discussions

AVERAGE NO. OF LIKES

  • Thankful Level 3

View badges

Feeds

View by

Question


Can someone give an example of a for loop for this problem?: Find the sum of 30 numbers that increments by 3. The starting number is 4. Thanks!
Just a simple for loop please. Nothing too complicated. Thank you again.

7 years ago | 2 answers | 0

2

answers

Question


How do I implement this function? What is an example I can use?
function h = pythagorean(legs) % hypotenuse = pythagorean(legs) h = (legs(1)^2 + legs(2)^2)^ 0.5; end

7 years ago | 1 answer | 0

1

answer

Question


How do you finish this for loop? It is telling me to define the variable "total", but what do I put in order for it to flow with the loop?
for i = 1:5 number = input('Enter a number: '); total = total + number; end fprintf('The sum of the numbers is %.2f\n', to...

7 years ago | 1 answer | 0

1

answer

1

answer

Question


Is there a more simple way to express this? How can I simplify everything under "case 2"? Is there an alternative to writing out everything under case 2?
clear clc month = input('Enter numerical value of month'); switch month case {9, 4, 6, 11} days = 30; ca...

7 years ago | 1 answer | 0

1

answer

Question


I know this is an invalid expression on line 9. How can I correct this error? Also, what error is this exactly? Matlab displayed multiple possibilities when trying to correct it.
clc clear x=input('Please enter a number:'); switch x case 0 disp("You have entered 0"); case 2 d...

7 years ago | 1 answer | 0

1

answer

Question


I keep getting the error "Error using input The first argument to INPUT must be a character vector." What does this mean? I've tried searching for it, yet cannot figure it out.
clc clear hello = input("Please enter a number"); switch hello case 0 disp("You have entered 0"); case 2...

7 years ago | 1 answer | 0

1

answer