A résolu


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

plus de 6 ans il y a

A résolu


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

plus de 6 ans il y a

A résolu


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

plus de 6 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 6 ans il y a

A résolu


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

plus de 6 ans il y a

A résolu


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer whi...

plus de 6 ans il y a

A résolu


Energy of a photon
Given the frequency F of a photon in giga hertz. Find energy E of this photon in giga electron volts. Assume h, Planck's ...

plus de 6 ans il y a

A résolu


How to subtract?
* Imagine you need to subtract one number from another using MATLAB. * You will not be using eval for this task. * Given two A...

plus de 6 ans il y a

A répondu
For-loop instantly jump to largest value
Your for loop construct itself is incorrect. It should be for rpm1 = a:b:c where a and c are start and end limits and b ...

plus de 6 ans il y a | 0

A répondu
how to plot output voltage graph of 6-pulse rectifier?
Simply use hold on command to hold the 6 plots on to the same figure. e.g hold on plot(y1); plot(y2); % and so on.

plus de 6 ans il y a | 0

A répondu
I am getting error for Q
Firstly, as far as the error is concerned, *to access any element of an array, its index has to be an integer, not a real number...

plus de 6 ans il y a | 0

A répondu
How to time-match measurements for two time series?
You can correlate the two data to find out the index of the correlation peak. Later, you can use this index to shift the indices...

plus de 6 ans il y a | 0

A répondu
universal control unit serial port connection
Use instrfind() function to find out the status of the current port that you want to connect to. That will do.

plus de 6 ans il y a | 0

A répondu
How can I separate a signal of same frequency but different amplitude?
The signal samples in the image looks like they are time-domain multiplexed.Try this x1 = x(1:2:end) and x2 = x(2:2:end). Don't ...

plus de 6 ans il y a | 0

A répondu
how to filter EEG excel data(2562*11) using matlab.
There is no need to use any for loops. Just use colon operator to extract a particular column from the matrix (formed after impo...

plus de 6 ans il y a | 0

A répondu
How to determine the distance at which two vectors intersect having their origins and their directions
You can make use of the function find() on their difference vector. That should do it.

plus de 6 ans il y a | 0

A résolu


Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

plus de 6 ans il y a

A résolu


Average of even-numbered columns
Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

plus de 6 ans il y a

A résolu


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

presque 10 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

plus de 11 ans il y a

A résolu


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

plus de 11 ans il y a

A résolu


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

plus de 11 ans il y a

A résolu


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

plus de 11 ans il y a

A résolu


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

plus de 11 ans il y a

A résolu


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

plus de 11 ans il y a

A résolu


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

presque 12 ans il y a

A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

presque 12 ans il y a

A répondu
Matlab help with discrete time signal
since your sequence is { ka,ka^2,ka^3,ka^4} which is {x(1) x(2) x(3) x(4) } and the sequence weights are known. hence your a= x(...

presque 12 ans il y a | 0

A répondu
Putting Three different functions into one program
if the functions are just based on some formulae , i mean for example it may be f(x)= some trigonometric formulae/expressions , ...

presque 12 ans il y a | 0

A répondu
command window data
1. If you have defined a function/looping structures for your code then all the variables will be local to that particular funct...

presque 12 ans il y a | 0

| A accepté

Charger plus