photo

TSmith


Last seen: más de 5 años hace Con actividad desde 2018

Followers: 0   Following: 0

Estadística

MATLAB Answers

8 Preguntas
0 Respuestas

CLASIFICACIÓN
288.924
of 301.506

REPUTACIÓN
0

CONTRIBUCIONES
8 Preguntas
0 Respuestas

ACEPTACIÓN DE RESPUESTAS
87.5%

VOTOS RECIBIDOS
0

CLASIFICACIÓN
 of 21.306

REPUTACIÓN
N/A

EVALUACIÓN MEDIA
0.00

CONTRIBUCIONES
0 Archivos

DESCARGAS
0

ALL TIME DESCARGAS
0

CLASIFICACIÓN

of 174.911

CONTRIBUCIONES
0 Problemas
0 Soluciones

PUNTUACIÓN
0

NÚMERO DE INSIGNIAS
0

CONTRIBUCIONES
0 Publicaciones

CONTRIBUCIONES
0 Público Canales

EVALUACIÓN MEDIA

CONTRIBUCIONES
0 Temas destacados

MEDIA DE ME GUSTA

  • Thankful Level 3

Ver insignias

Feeds

Ver por

Pregunta


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.

más de 7 años hace | 2 respuestas | 0

2

respuestas

Pregunta


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

más de 7 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 7 años hace | 1 respuesta | 0

1

respuesta

Pregunta


I am trying to get this function to work properly. I am wanting it to add together given values. What is wrong with my syntax? Thank you.
function result = findSum(a,b) result = a + b a=3 b=4

más de 7 años hace | 1 respuesta | 0

1

respuesta

Pregunta


Can someone explain what each line of code is doing step by step starting with line 2, skipping line 3, then all lines 4-10? What exactly is line 2 setting theMax equal to? No matter how I alter A(1) to A(2/3/4) the output doesn't change.
A = ceil(rand(1,10)*100) theMax=A(1); theIndex=1; for index = 1:length(A) x = A(index); if x > theMax theM...

más de 7 años hace | 0 respuestas | 0

0

respuestas

Pregunta


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

más de 7 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 7 años hace | 1 respuesta | 0

1

respuesta

Pregunta


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

más de 7 años hace | 1 respuesta | 0

1

respuesta