Statistiques
0 Questions
8 Réponses
RANG
102 379
of 301 994
RÉPUTATION
0
CONTRIBUTIONS
0 Questions
8 Réponses
ACCEPTATION DE VOS RÉPONSES
0.00%
VOTES REÇUS
0
RANG
of 21 484
RÉPUTATION
N/A
CLASSEMENT MOYEN
0.00
CONTRIBUTIONS
0 Fichier
TÉLÉCHARGEMENTS
0
ALL TIME TÉLÉCHARGEMENTS
0
RANG
of 177 967
CONTRIBUTIONS
0 Problèmes
0 Solutions
SCORE
0
NOMBRE DE BADGES
0
CONTRIBUTIONS
0 Publications
CONTRIBUTIONS
0 Public Chaîne
CLASSEMENT MOYEN
CONTRIBUTIONS
0 Point fort
NOMBRE MOYEN DE LIKES
Feeds
I need a program to check prime numbers
n = 17; % Change the number to test if n <= 1 disp('Not a Prime Number'); else prime = 1; for i = 2:sqrt(n...
environ 6 heures il y a | 0
n th Fibonacci number with function
function fib = fibonacciSeries(N) fib = zeros(1,N); if N >= 1 fib(1) = 0; end if N >= 2 ...
environ 7 heures il y a | 0
how can I count the number of elements on a vector?
v = [-5, 10, 0, 8, -2, 15, -7]; count = 0; for i = 1:length(v) if v(i) > 0 count = count + 1; end end ...
environ 7 heures il y a | 0
how do i reverse a vector
v = [10, 20, 30, 40, 50]; n = length(v); for i = 1:n rev(i) = v(n - i + 1); end disp('Reversed vector:'); disp(r...
environ 7 heures il y a | 0
how to sum all elements of one vector?
v = [10, 20, 30, 40, 50]; sumValue = 0; for i = 1:length(v) sumValue = sumValue + v(i); end disp(['Sum of all ele...
environ 7 heures il y a | 0
How to return the maximum value of a vector without using the built in function max(x)?
v = [12, 45, 7, 89, 34, 56]; largest = v(1); for i = 2:length(v) if v(i) > largest largest = v(i); end ...
environ 7 heures il y a | 0
Odd and even numbers
function evenOdd(n) if mod(n,2) == 0 disp('The number is Even'); else disp('The number is Odd'); ...
environ 7 heures il y a | 0
Write a function to calculate the area of a circle
function area = circleArea(r) area = pi * r^2; end
environ 7 heures il y a | 0
