A résolu


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

plus de 5 ans il y a

Réponse apportée
Plot {(x,y,z)| x²+y²<1, 0<z<x+2}
Same general idea as @Constantino Carlos Reyes-Aldasoro, but more in steps. Use linspace or colons to create one or three vecto...

plus de 5 ans il y a | 0

Réponse apportée
라이센스의 Maintenance Service 관련 문의
Even if sometimes staff members look on this forum and post from time to time, the help on this forum is mostly provided by peop...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Download app to an old version of MATLAB
You can't. Toolboxes are tied to Matlab releases. This holds for all toolboxes by Mathworks for the past decade at least. Insta...

plus de 5 ans il y a | 0

Réponse apportée
how to find current time in millis
datestr(now,'yyyy/mm/dd HH:MM:SS.FFF')

plus de 5 ans il y a | 0

Réponse apportée
Missing points before and after the R peaks
Something like this is what I meant: before=100; after=100; for n=1:numel(qrs_i) ind=(qrs_i(n)-before):(qrs_i(n)+after); ...

plus de 5 ans il y a | 1

Réponse apportée
How would you automate this code?
Th cumsum and find functions should be useful. Let me know if you have trouble implementing it.

plus de 5 ans il y a | 0

| A accepté

A résolu


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

plus de 5 ans il y a

Réponse apportée
How can i plot this function with factorial?
If you want to plot a function, you should do so explicitly: lap = @(x)(3*factorial(x)-1)./(120*10^(12)); xValues = round(logs...

plus de 5 ans il y a | 0

Réponse apportée
How to split an array based on the maximum number?
You can use the function below to find the first digit of positive values, which you can then use to group your data. f=@(x)flo...

plus de 5 ans il y a | 1

Réponse apportée
How to remove outlier form boxchart graph ?
You can set the MarkerStyle property to 'none' to hide the markers. data=rand(100,2);data(end,:)=2; boxchart(data,'MarkerStyle...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Set Matrix Elements based on Coordinates Matrix
You can use sub2ind to convert you coordinate array to linear indices. Then you can use normal indexing to set values. C = [2 3...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Read multiple text files as separate matrices
The textscan function requires either an fid as input, or a character array. Your code doesn't actually read the data from the f...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to create axis with perfect square ticks
The answer from @Mara provides all the tools you need, but there are still some caveats. Note that the first option will not set...

plus de 5 ans il y a | 2

| A accepté

A résolu


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

plus de 5 ans il y a

Réponse apportée
Is there an easier way to change the values in a matrix that are less than 2 to zero all at once?
Learn about logical indexing: A = rand(3,4); A(2)=NaN; L=isnan(A) A(L)=0 See what this returns. You should be a...

plus de 5 ans il y a | 0

Réponse apportée
MATLAB Smallest Integer in floating point number system
You are indeed correct: realmin,log2(realmin) Unless you actually mean integer, in which case the smallest integer is 0. If y...

plus de 5 ans il y a | 0

Réponse apportée
error messeges in MATLAB app designer
Personally I have started using the attached functions (e.g. in my readfile function). With only minimal changes in the syntax o...

plus de 5 ans il y a | 1

| A accepté

A résolu


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

plus de 5 ans il y a

A résolu


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

plus de 5 ans il y a

A résolu


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

plus de 5 ans il y a

A résolu


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

plus de 5 ans il y a

A résolu


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

plus de 5 ans il y a

A résolu


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

plus de 5 ans il y a

A résolu


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

plus de 5 ans il y a

Réponse apportée
Is it possible to manipulate a plot axis; i.e., divide values by 1000 so that the x axis range is 0 to 300 instead of 0 to 300000 and also get rid of exponential notation?
You can explicitly set the tick labels: plot(linspace(0,3e5,10),rand(1,10)) xticklabels(arrayfun(@(x)strrep(sprintf('%.1e}',x)...

plus de 5 ans il y a | 0

| A accepté

A résolu


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

plus de 5 ans il y a

A résolu


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

plus de 5 ans il y a

A résolu


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

plus de 5 ans il y a

A résolu


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

plus de 5 ans il y a

Charger plus