Answered
button to plot waveforms
Like this? function guiSample() h = figure; uicontrol(... 'Parent', h,... 'Units', 'normalized',... 'Position',...

7 years ago | 1

Answered
Any algorithm to separate very high values from a data set?
If you have percentage of outlier (say, 5%), I think you can assume 95th percentiles of a data set as a threshold, like: % Assu...

7 years ago | 0

| accepted

Answered
how can I average monthly Windspeed (Ws) data from 1945-2010. The data loaded into a struct, with 2 fields (data.t and data.ws)
Thank you for sharing your original CSV file. By using readtable and retime functions, you can do this task more easily! Follow...

7 years ago | 0

| accepted

Answered
Merge two text files using uiget
One possible solution would be like this. Just FYI: Since menu function is not recommended in recent MATLAB versions, I have ...

7 years ago | 0

Answered
Compare elements and shift the elements up or down based on matching previous or next elements
If x1 contains all elements in x2 and x3, I believe the following code works. x1 = ... ["Liability and Equity"; "Short-te...

7 years ago | 0

Answered
Interpolation of angular data spline or linear?
One possible solution would be looks like this. In addition, if you feel @Image Analyst's answer for your previous question usef...

7 years ago | 1

| accepted

Answered
How to extract 3 distinct curves from a mask into separate matrices?
Assuming your 1018x2038 mask is BW, the following code can extract coordinates of each line. s = regionprops(BW,'PixelList'); ...

7 years ago | 1

| accepted

Answered
How add ". . ." sign between subplot
I think one possible solution would be like this: figure subplot(1,3,1) plot(magic(4)) subplot(1,3,2,... 'Visible','off'...

7 years ago | 0

| accepted

Answered
How do i save URL's of Images at a specific size into a sub-folder of my choosing?
I would recommend using webread, imresize and imwrite functions to do this task. I think the solution would be looks like: % Ex...

7 years ago | 0

| accepted

Answered
How do I convert a 2d matrix to a 3d matrix?
It's time to use reshape function! Please try the following: A = reshape(C',[2,3,3]);

7 years ago | 1

| accepted

Answered
sfit型からの2次元等高線の補間
外挿になるので 'lowess' のような手法は使えませんが、scatteredInterpolant 関数を使うと、以下のように線形での内挿・外挿を同時にすることができます。 F = scatteredInterpolant(x1(:),y1(:),z...

7 years ago | 2

Answered
How I can find number of index?
Though the question is not sufficiently clear for me, I think one possible solution would look like this. x = 7.75717; str ...

7 years ago | 0

Answered
i want x,y coordinates which are randomly generated between 1 to 300 ,condition is distance between every coordinate is >20. how to proceed further
How about the following? BWremain = true(300); % Number of random coordinates N = 5; % Selected coordinates are stored t...

7 years ago | 1

| accepted

Answered
Bubble analysis : how to separate following bubbles ?
By combining some functions, characteristics (equivalent diameter, center, area...etc) of each bubble can be calculated. The fol...

7 years ago | 0

Answered
calculating the average of every pixel in a 3D matrix in a 3x3x3 neighborhood
Since convolution works like a weighted moving average, I believe convn function can do this task. The following is an example. ...

7 years ago | 0

Answered
Importing alternating data points
Like this? Using this code, you can extract every 100th value (100th, 200th,...etc) from the 4th column. T = readtable('Dataset...

7 years ago | 0

Answered
Remove repeat values in a text file
Assuming your data is stored in table variable T >> T T = 7x6 table day month year hour minute temperat...

7 years ago | 0

| accepted

Answered
How to easily calculate the average distance of a point to all other non-zero points in a binary image?
Assuming BW is your binary image (2D logical array), you can calculate average distance from given point to all non-zero point b...

7 years ago | 0

Answered
Import csv data with readtable is incorrect data.
Please specify 'Delimiter' option, like: T = readtable('store_id_relation.csv','Delimiter',','); The result is as follows. ...

7 years ago | 1

| accepted

Answered
Remove unwanted pixel from an image
One simple way to do this type of task is morphological opening. Here is an example. % Read and binarize your image I = imread...

7 years ago | 1

Answered
Finding local maxima on a slightly noisy data
I think one possible way would be setting 'MinPeakProminence' option in findpeaks function, like: findpeaks(yourData,'MinPeakPr...

7 years ago | 0

Answered
How can i remove a range of values coresponding to X values from a fit plot.
How about removng outlier points by using isoutlier function before fitting the data? The following is a simple example. % Samp...

7 years ago | 0

Answered
行列データの線形補間のついて
各データファイルには320x640の数値データのみがテキスト形式で保存されているとして、なおかつ全データファイルの内容をメモリ上に展開できるだけのメモリサイズがあるものと仮定します。 そうすると、全データをいったんtimetable型変数としてメモリ上に...

7 years ago | 3

| accepted

Answered
recognize the center and diameter of a circle
If you have Optimization Toolbox, you can solve this nonlinear least-square problem by simply using lsqnonlin function, like: l...

7 years ago | 0

| accepted

Answered
how to add lines to histograms plotted by plotmatrix
How about the following? % Sample data X = rand(50,3); figure [~,ax] = plotmatrix(X); hold(ax(1,3),'on') plot(ax(1,3),[0...

7 years ago | 1

| accepted

Answered
How can I create a for cycle replacing text in a string array?
How about the following? In this case, vector(1,:) = ["Home1" "Home2"], ..., vector(5,:) = ["Home5" "Home6"]. vector0 = r...

7 years ago | 0

Answered
I need to create a function named 'HeavisideFunct' which requires a single input x, and outputs y, which is the Heaviside step function (Equation 5). Where H(x) = 0 for x<0; 1 for x > 0; 0.5 for x = 0.
How about the following? function y = HeavisideFunct(x) y = zeros(size(x)); % x < 0 idx = x < 0; y(idx) = 0; % x > 0...

7 years ago | 0

Answered
Combine 2 different columns with year and quarter in numeric to a single date column for time - series purpose
Like this? % Example of initial table Year = repelem((1987:1990),1,4)'; Quarter = repmat((1:4),1,4)'; T = table(Year,Quarter...

7 years ago | 0

Answered
How can I fit a line to values and plot it on the same plot as those values?
Maybe I guess the usase of polyfit, polyval or hold function in your code is incorrect. How about the following? % Sample data ...

7 years ago | 0

| accepted

Answered
How can I graph pressure data as a contour?
Please convert your data into "grid data" using meshgrid and griddata functions, like: % Make x-y mesh grid [xq,yq] = meshgrid...

7 years ago | 1

Load more