Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

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

fast 7 Jahre vor | 0

Gelöst


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]

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

mehr als 11 Jahre vor

Gelöst


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.

mehr als 11 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

fast 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

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

etwa 12 Jahre vor | 0

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

etwa 12 Jahre vor | 0

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

etwa 12 Jahre vor | 0

| akzeptiert

Mehr laden