Réponse apportée
Generates a sawtooth wave with amplitude of 1 unit, a frequency of 2 Hz or (4pi radians per second) and a phase shift of pi/4 radian.
% amplitude amp = 1; % fundamental frequency f = 2; % time span of 10 periods T = 10/f; % phase shift theta = pi/4; % sa...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Selection by circular indexing
function y = circularSelect(v, a, b) N = length(v); idx = a:b+N*(b<a); idx(idx>N) = idx(idx>N)-N; y = v(idx); end

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
how to plot group delay with respect to omega_1 and omega_2 for 2-D dimensional digital filter
Use grpdelay. A built-in Matlab function.

plus de 3 ans il y a | 0

Réponse apportée
how to interpolate for increasing - decreasing type of data set
The function interp2 performs interpolation for 2D gridded data. It has the form Vq = interp2(X,Y,V,Xq,Yq), where X and Y contai...

plus de 3 ans il y a | 0

Réponse apportée
What is the result of the following command? x = 5 : -2 : 1
Your command has the form: x = x1:stp:x2, where x1 is the starting value, x2 is the end value, and stp is the step. Applying tha...

plus de 3 ans il y a | 0

Réponse apportée
how to detect circles in the provided .bmp image?
Read Detect and Measure Circular Objects in an Image

plus de 3 ans il y a | 0

Réponse apportée
reading specific lines from a .txt file
Use readmatrix and specify the 'Range' option. Assuming that you have a one-column txt file, you can use the following: A = rea...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
In table, how to count a number of specific values by year?
year = [repmat(2018, [3,1]); repmat(2019, [13,1]); repmat(2020, [4,1])]; win = [1;2;0;0;1;0;2;0;2;1;0;2;1;1;1;2;2;1;2;0]; T = ...

plus de 3 ans il y a | 0

Réponse apportée
Is there any clear explain and simple how to decide what is the best frequency resolution and how to chose the window size for this signal
The question is unclear. If you are asking about the number of points in your signal (i.e., number of samples), then it is sim...

plus de 3 ans il y a | 0

Question


How can I set the labels of multiple axes without iteration?
Hello all, I have a figure with multiple uipanels, each with its own axes. How can I set the labels of all the pannels' axes at...

plus de 3 ans il y a | 1 réponse | 0

1

réponse

A résolu


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

plus de 3 ans il y a

A résolu


Find the distance between runs
Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

plus de 3 ans il y a

A résolu


Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

plus de 3 ans il y a

A résolu


Sum My Indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

plus de 3 ans il y a

A résolu


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

plus de 3 ans il y a

A résolu


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

plus de 3 ans il y a

A résolu


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

plus de 3 ans il y a

A résolu


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

plus de 3 ans il y a

A résolu


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

plus de 3 ans il y a

A résolu


Look Up Mapping
Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

plus de 3 ans il y a

A résolu


Sorting integers by their digits (Level 4)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

plus de 3 ans il y a

A résolu


Sorting integers by their digits (Level 3)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

plus de 3 ans il y a

A résolu


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

plus de 3 ans il y a

A résolu


Assignment Problem
Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

plus de 3 ans il y a

A résolu


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

plus de 3 ans il y a

A résolu


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

plus de 3 ans il y a

A résolu


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

plus de 3 ans il y a

A résolu


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

plus de 3 ans il y a

A résolu


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

plus de 3 ans il y a

A résolu


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

plus de 3 ans il y a

Charger plus