Resuelto


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

más de 5 años hace

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

más de 5 años hace | 0

Respondida
라이센스의 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...

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

Respondida
how to find current time in millis
datestr(now,'yyyy/mm/dd HH:MM:SS.FFF')

más de 5 años hace | 0

Respondida
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); ...

más de 5 años hace | 1

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

más de 5 años hace | 0

| aceptada

Resuelto


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

más de 5 años hace

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

más de 5 años hace | 0

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

más de 5 años hace | 1

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

más de 5 años hace | 1

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 0

| aceptada

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

más de 5 años hace | 2

| aceptada

Resuelto


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

más de 5 años hace

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

más de 5 años hace | 0

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

más de 5 años hace | 0

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

más de 5 años hace | 1

| aceptada

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

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

más de 5 años hace | 0

| aceptada

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Cargar más