Answered
How to partition hourly Data by month
Yes, you can calculate monthly mean of your timetable by |retime| function, like this. More details can be found in <https://jp....

8 years ago | 0

| accepted

Answered
smoothening of curve in matlab
The following is an example to apply moving average and fit with n-th degree polynomial using basic MATLAB functions. % Sam...

8 years ago | 0

Answered
Split a matrix at specific row
Like this? % Input matrix (A) and vector (h) A = rand(105,4); h = [11 12 11 11 12 12 13 11 12]; % Calculate start- a...

8 years ago | 0

Answered
How to crop the gray scale image automatically???
How about the following script? I = imread('1.jpg'); BW = imbinarize(I); BW1 = bwconvhull(~BW); s = regionprops(BW1,'Bou...

8 years ago | 0

Answered
how can I open multiple text file only specific low and then save??
Like this? Running the following code at the directory where your data (*.txt) is stored, it extracts 1501~16500 rows and saves ...

8 years ago | 0

| accepted

Submitted


Demo Files for Predictive Maintenance
Demo files for predictive maintenance (PdM)

8 years ago | 3 downloads |

5.0 / 5
Thumbnail

Answered
adding elements to beginning of each row
I think the desired result could be the following. 0 1 2 3 4 0 0 0 0 5 6 7...

8 years ago | 1

| accepted

Answered
How can I read a column from a word file?
The better way is to convert your data to text (or CSV) file first by MS Word... But, anyway, if you have to read from MS Wor...

8 years ago | 1

Answered
Change the value of a percentage of elements , randomly, ina vector
Like this? % Sample vector of 100 elements x = rand(100,1); % Percentage p = 0.2; % One solution: nSelect = ro...

8 years ago | 1

Answered
how can i estimate parameters of two independent gamma distributed variables with one same parameter in matlab?
I think one possible way to do this is to use maximum likelihood estimation method, like: % Sample data X1 = gamrnd(2,10,1...

8 years ago | 1

| accepted

Answered
FFT \ Peak points
Please change the 'amplitude peaks' section of your code to the following: % amplitude peaks [pks,locs] = findpeaks(mx(1:n...

8 years ago | 0

| accepted

Answered
How to plot a log log equation
It seems that your data can be better fitted by 'Ts = b1 + b2*(v/a)' rather than 'Ts = b1 + b2*log(v/a)'. Here is an example to ...

8 years ago | 0

Answered
How do I isolate lines at a certain angle in an image.
Same as previous post, you can utilize |regionprops| function, like: % Read your image and binarize I = imread('5159-15B f...

8 years ago | 0

| accepted

Answered
Adjust axis aspect ratios independently for 3D plot
I would recommend using |daspect| function to control ratio of x-, y- and z-axis scale. <https://jp.mathworks.com/help/matlab...

8 years ago | 0

Answered
How do I generate a random dna sequence without specific codons?
|randseq| function does not have the option to exclude stop codons. The following is one possible solution to generate random se...

8 years ago | 0

Answered
Hello Everyone, I'm looking for your help for the following problem
The second image you uploaded is not the correct maximum value array for each column... Anyway, let me try to do this without us...

8 years ago | 0

| accepted

Answered
how to generate primespiral in image ?
Please try the following. imagesc(isprime(spiral(200)))

8 years ago | 0

Answered
How do I use a string in my input?
Like this? function my_wish(str,val) switch str case 'square' result = sprintf('The square of %d is %d',val,...

8 years ago | 0

| accepted

Answered
How to plot four dimensional data in a single plot
One possible solution would be using scatter plot with changing marker color and/or marker size to represent 4th dimension value...

8 years ago | 0

Answered
NEW MATRIX WITH IF CONDITIONS
Like this? D1 = [10 20 30 40]; S1 = [1 0 0 1]; D2 = zeros(size(D1)); pt = find(S1); for kk = 1:numel(pt) i...

8 years ago | 0

| accepted

Answered
how to split a string at apostrophe using strsplit
You should repeat apostrophe to represent apostrophe in MATLAB, like: >> S='I''m fine!' S = 'I'm fine!' So, regar...

8 years ago | 2

| accepted

Answered
Length's of matrix rows exclusing padding
If each row in X has at least one non-zero value, the following code can calculate Y. X = [ 0 1 0 1 0 1 1 0;... 0 1 0 ...

8 years ago | 0

| accepted

Answered
How do i count the horizontal lines in an image
Thank you for uploading the clean image! In my view, one simple and straight-forward solution will be |regionprops| function....

8 years ago | 1

| accepted

Answered
How to get an n-by-n matrix from 1-by-n cells
One solution: T1 = array2table(ratings); T1.Properties.VariableNames = users; T1.Properties.RowNames = movies; Another...

8 years ago | 0

| accepted

Answered
Rename files in a directory
Another possible solution: f = dir('*.csv'); for kk = 1:numel(f) fileFrom = f(kk).name; fileTo = ['data',era...

8 years ago | 0

| accepted

Answered
Function that transforms years into days
Like this? function numDay = year2days(year) numDay = days(datetime(year,12,31)-datetime(year,1,1))+1; end The fol...

8 years ago | 0

| accepted

Answered
slider direction max min
How about adding a label at each end of the slider to indicate "min" to "max," and use the correct value (ex. |-1*sl.Value| in t...

8 years ago | 0

| accepted

Answered
How to generate a time variable from CSV and set new time steps
The solution would be like this: % Read CSV file T = readtable('S1b2-20-17_AWedited.csv','Format','%s%s%f%s%s%f%f%f%f%f%...

8 years ago | 0

| accepted

Answered
How to put a header in a txt file?
Straight-forward solution would be like this: % Read the file fid = fopen('yourData.txt','r'); str = textscan(fid,'%s','D...

8 years ago | 0

| accepted

Answered
How to remove some lines of a file?
Assuming your file is a text file, you can extract the first 744 lines ans save it like this: % Full path of the sample tex...

8 years ago | 0

| accepted

Load more