回答済み
Skipping row data repeatedly
Like this? % Sample data (size of 491520) data = rand(491520,1); idx = repelem([true;false],102); idx = repmat(idx,c...

約8年 前 | 1

| 採用済み

回答済み
How to pick specific file name in directory
As Stephen-san and dpb-san mentioned, regular expression will help extract files based on file name. Here is one example to extr...

約8年 前 | 0

| 採用済み

回答済み
Simulate a five-state absorbing Markov chain
If you have Statistics and Machine Learning Toolbox, you can do this much easier, like: % Transition matrix trans = [... ...

約8年 前 | 1

| 採用済み

回答済み
textscan doesn't work well when I read 2 lines batch.
Seems that you need to add newline code (\n) or carriage return + newline codes (\r\n), like: data = textscan(fid,'%d / Pre...

約8年 前 | 1

| 採用済み

回答済み
How do I sample a random value from a matrix?
If you want to obtain |k| samples randomly from |A|, the following will do that. ind = randperm(numel(A),k); output = A(in...

約8年 前 | 0

| 採用済み

回答済み
How to plot the struct data. I am having an issue regarding plotting following data.
Like this? But, looking at your data, there are so many NaNs, and most of the data points are concentrated in some small clus...

約8年 前 | 0

回答済み
Time Series change point detection
|ischange| or |findchangepts| function will do that. If you could upload your data, I would be happy to check it. <https://jp...

約8年 前 | 1

回答済み
Eliminate rows in a matrix that have matching & different values
Assuming your matrix is |A|, the following code returns what you want as |B|. B = sortrows(A,[1 4]); idx = [false; diff(B(...

約8年 前 | 1

| 採用済み

回答済み
Printing values in a GF array
Like this? r0 = gf((0:1023),10,1387); val = r0.x; for kk = 1:numel(val) fprintf('r0(%d): %d\n',kk,val(kk)) end

約8年 前 | 0

| 採用済み

回答済み
Find Vector of Index Without Using Loop
Please try |ismember| function, like: [~,idx] = ismember(b,a);

約8年 前 | 0

| 採用済み

回答済み
How to Seperate Red Blood cells.
Hi Basit-san, Thanks for sharing your RGB image with us. The following is my preliminary try. As shown in the attached result...

約8年 前 | 2

| 採用済み

回答済み
plotting vectors of 3 population over years
I think you have to make year vector to plot your data, like: vec1 = [115600 765840 123423]; vec2 = [115100 765440 543245]...

約8年 前 | 0

回答済み
How to set the seed of cvpartition
Please add |rng| function just before |cvpartition| to set seed of the random number generation. Here is an simple example: ...

約8年 前 | 2

回答済み
Need to combine two matrix
How about the following? R = mat2cell([P(:) Q(:)],ones(1,numel(P))) R = reshape(R,[],2);

約8年 前 | 0

| 採用済み

回答済み
Loop to calculate area under curve using rectangle methode
Sorry for my late response. Here is an simple example. % Sample data dx = pi/10; x = 0:dx:2*pi; y = 1+sin(x); % int...

約8年 前 | 0

回答済み
How to count how many numbers are prime in each column
How about using |isprime| function? sum(isprime(onethousand)) It returns: >> sum(isprime(onethousand)) ans = ...

約8年 前 | 0

回答済み
Find and replace values in a cell array containing 3-D matrixes with numeric values
Another possible solution: YourCellArray = cellfun(@replaceZeroWithNan,YourCellArray,'UniformOutput',false); function ...

約8年 前 | 1

| 採用済み

回答済み
Finding duration of a signal
Looking at your variable |src1|, SampleFrequency and Data length are 5000000 and 50000, respectively. So, assuming physical unit...

約8年 前 | 0

| 採用済み

回答済み
make list with columnames
Column names of your table, say |T|, can be extracted by |T.Properties.VariableNames|. The following is a simple example. %...

約8年 前 | 1

回答済み
Read text file data
Like this? fid = fopen('YourData.txt','r'); C = textscan(fid,'%s%f%f%f%f%*4s','Delimiter',';'); fclose(fid); A = str...

約8年 前 | 0

回答済み
Finding out the average values per day
Like this? % Sample Data (Hourly values per day over 10 months) Time = [datetime(2018,1,1):hours(1):datetime(2018,10,1)]';...

約8年 前 | 2

回答済み
Finding out mean monthly values from daily values
By converting your |table| to |timetable| and using |retime| function, you can do it easily, like: load('hourly_wind_speeds...

約8年 前 | 0

回答済み
How to partition hourly Data by month
When your data has multiple columns, the following will work. % Sample hourly data from 1989/1/2 to 2004/12/31 Time = (dat...

約8年 前 | 1

回答済み
Norm of group of elements whose position is reported on a cell array
Like this? % Sample data x and class info cell array g x = rand(10,1); g = {[1 3 5 7 9],[2 4 6 8 10]}; % Calculate 2...

約8年 前 | 0

| 採用済み

回答済み
how to split an arabic handwritten text into 2 image : one for the dots and the other for the text ?
Using the attached screen capture image as an input image file, applying |regionprops| function and adjusting a threshold of pix...

約8年 前 | 1

回答済み
Polarplot with negative theta display
You can plot it by tuning axes properties, like: % Sample data theta = deg2rad(-150:30:180); rho = 10*rand(size(theta)); ...

約8年 前 | 2

| 採用済み

回答済み
Label X-axis title based on excel/csv header
By using |readtable| function, you can read header line in your csv file and put them to the figure. The following is an example...

約8年 前 | 0

回答済み
Undefined function or variable 'envspectrum'
The function |envspectrum| was introduced in R2017b, as shown at the bottom of the documentation page. So I would recommend upda...

約8年 前 | 0

回答済み
How to combine tables and add new row
OK, I understand the situation. How about the following script? Scene = {AA.Scene; BB.Scene; CC.Scene; DD.Scene]; T = [t...

約8年 前 | 0

回答済み
How can I replace value of specific cell value depending on another matrix?
If some rows in D does not have corresponding rows in A, need some more trick. Here is an example. % Sample data (1st and 4...

約8年 前 | 0

さらに読み込む