Answered
Why won't this equality work?
wh17=maxk(w(:,3),17); Hs=mean(wh17); Ts=w(ismember(w(:,3),wh17),2);

3 years ago | 0

| accepted

Answered
Matrix column selection based on vector with indices
Why not just a simple loop? k=ones(10,14); v=randi(size(k,2),1,size(k,1)); for j=1:size(k,1) k(j,v(j))=0; end

3 years ago | 0

Answered
i have to get similar output as i have uploaded.why my data is getting repeated again and again?
T=readtable('input.csv'); th=[0:1:3]'; result=[th,reshape(T.re+T.im*1i,size(th,1),[])]; csvwrite('sample.csv',result);

3 years ago | 0

Answered
Vector Multiply by Vector
x = input('Enter first number: '); y = input('Enter second number: '); r=[x,y,x*y*(1:100)]; r=r(r<=1e4);

3 years ago | 1

Solved


Leonardo primes
Leonardo numbers are defined by following recurrence relation: Leonard prime is Leonardd number which is also prime (see ...

3 years ago

Solved


Area under the curve
Compute area under the curve specified by points stored in y, where y is in range (0,inf) and x time step is 1. note: please r...

3 years ago

Solved


Calculate pi using the Mandelbrot Set.
The Mandelbrot Set is a set of complex numbers built around a simple iterative equation for which the orbit of the critical poin...

3 years ago

Solved


Find the number of rectangles
There is a m*n grade given. Find the number of rectangles in the grid. Remember, a square is also a rectangle.

3 years ago

Solved


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

3 years ago

Solved


How many complete pizzas (number 2)
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

3 years ago

Solved


How many complete pizzas
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

3 years ago

Solved


Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

3 years ago

Solved


Intrication de deux vecteurs
Ecrire une fonction "intric" qui prend en entrée un vecteur ligne v1 et un vecteur ligne v2 et renvoie le vecteur ligne vres don...

3 years ago

Solved


Tracer un carré de côté a et de centre O
Définir une fonction carre qui prend en entrée un salaire a et un vecteur O de deux élements représentant les coordonnées cartés...

3 years ago

Solved


List numbers that are not squares
The numbers 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, etc. are not perfect squares. Write a function to list the th term in ...

3 years ago

Solved


compter le nombre de zéros dans une matrice
écrire une fonction count_zeros qui prend en entrée une matrice M et détermine le nombre de zéros dans une matrice

3 years ago

Solved


Easy Sequences 76: Not so easy as Pisano Pi
Pisano period , of an integer , is the period in which the sequence of Fibonacci numbers modulo repeats. For example it is not ...

3 years ago

Solved


Easy Sequences 75: Easy as Pisano Pi
Pisano period , of an integer , is the period in which the sequence of Fibonacci numbers modulo repeats. For example it is not ...

3 years ago

Solved


Easy Sequences 73: Emergence of Fibonacci Insects
Cicadas are natural mathematicians. In order to avoid their natural predators (in this case, the wasp), they emerge from hiberna...

3 years ago

Solved


Jump Search - 02
Find the number of leaps you need to take to find the 'first occurrence' of an element in an array using the jump search algorit...

3 years ago

Solved


Jump Search - 01
Find the number of leaps you need to take to find an element in an array using the jump search algorithm. For example, a=[ 2,...

3 years ago

Solved


Return the middle element of an NxN square matrix where N is odd
Let's say you are given an NxN square matrix where N is always going to be an odd number: x = [ 1 2 3 4 5 6 7 8 ...

3 years ago

Solved


Ordinary Annuity : Number of Payments (Present Value)
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 years ago

Solved


Ordinary Annuity : Rate (Present Value)
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 years ago

Solved


Ordinary Annuity : Periodic Payment (Present Value)
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 years ago

Solved


Ordinary Annuity : Present Value
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 years ago

Solved


Ordinary Annuity : Number of payments (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

3 years ago

Solved


Ordinary Annuity : Rate (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

3 years ago

Solved


Ordinary Annuity : Periodic Payments (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

3 years ago

Load more