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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 2

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 2

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 0

Beantwortet
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)]';...

etwa 8 Jahre vor | 2

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 2

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

Mehr laden