Réponse apportée
How to find and color circle in a binary image of circles using sliding window through out the image?
Looking at the original image, target regions are filled with plane color. So I tried to apply the entropyfilt to extract the R...

plus de 6 ans il y a | 1

Réponse apportée
選択肢から重複を許して並べる順列のパターンを列挙した行列を作る方法
meshgrid や ndgrid 関数を利用する方法では如何でしょうか? たとえば [0 1] から重複を許して3つ選ぶという例ですと、以下のようになります。 [x1,x2,x3] = meshgrid([0 1],[0 1],[0 1]); A ...

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
複数の比較対象に関してどのインデックスが一致しているかを知る方法
ismember 関数を使うと、簡単に見つけることができます。たとえばご質問の例ですと、以下のようになります。 A = 11:20; B = [11 12 14 14]; [~,loc] = ismember(B,A); >> loc loc =...

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
classify関数によって得られた確率をROC曲線の出力をすることは可能でしょうか?
classify 関数によって得られた確率(スコア)からROC曲線を出力をすることは可能です。そのためには、プログラムを若干修正する必要があります。 まず、perfcurve 関数への入力は、エラーメッセージにもあるように「スコアは浮動小数点のベクトルと...

plus de 6 ans il y a | 4

| A accepté

Réponse apportée
How to subset a table and pass the variable names?
Instead of using T2 = T{Ind,:} (I believe TT{Ind,:} is typo and T{Ind,:} is correct), the following can extract the correspondin...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Change text to numbers in a cell
How about the following? B = replace(A,'text one','1'); B = cellfun(@str2double,B(:,1:end-1),'UniformOutput',false); A = [B,A...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How can ı creat poisson random variables?
You can generate random number by using poissonrnd function, like; lambda = 75; r = poissrnd(lambda); Or, if you want to gene...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How calculate daily, monthly, seasonally mean average and std?
I would recommend storing the data as timetable variable, and applying retime function. The following is an example: % Load da...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Monthly Average from Daily Data
Another way is to use groupsummary function. The following is an example (note that the follwing returns average value with nan...

plus de 6 ans il y a | 0

Réponse apportée
離散点の流線の表示
さっそく対象データを提供頂き、ありがとうございます。 MATLABには流線をプロットするための関数として、streamline が用意されています。ただ、この関数は入力データがメッシュグリッドになっている必要があります。 頂いたデータを見ますと (x,...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to normalize data of each row of Matrix A=[10 20 30 40;5 15 25 30]; between 0 and 1?
I believe you can do this task by simply applying normalize function, like: B = normalize(A,2,'range'); % Normalize each row to...

plus de 6 ans il y a | 0

Réponse apportée
ライブスクリプトのFigureを外に出す
下記のように、"Visible" プロパティを "on" に指定することで、Figureウィンドウを別に表示させることができます。 figure("Visible","on")

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
make video to combine two png series from different file folder
How about the following solution? s = dir('*.png'); v = VideoWriter('output.avi'); open(v); for kk = 1:numel(s) fil...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Merge two files with different information
As Walter-san mentioned, the solution would be like this: % Read .txt files T1 = readtable('file1.txt','ReadVariableNames',fal...

plus de 6 ans il y a | 0

Réponse apportée
extracting only number from text file
How about the following? % Read the original text file c = readcell('data.txt','Delimiter','\n'); % Extract coordinates fro...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
for文とif文の併用
やりたい内容は、「条件 Y(k) <= sr & Y(k+1) >= sr を満たす点での dY/dX の値を計算し、結果を配列 C として保存したい」と理解しました(間違っていたらご指摘ください)。 以下の方法ではいかがでしょうか。ただし上記条件を満た...

plus de 6 ans il y a | 1

Réponse apportée
Determine separated node in graph
I'm not sure what is the final goal and/or application of this process. But let me try to do this task (since this "puzzle" will...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to create block circulant matrix?
How about the following? % For simple example n = 3; m = 2; % Create n-by-n circulant matrix B_block = gallery('circul',1...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Creating a matrix which contains submatrices
Assuming the submatrix is n-by-n Identity matrix, the solution would be like this: n = input('Please enter n: '); subMat = eye...

plus de 6 ans il y a | 0

Réponse apportée
Merge two columns of same table into one
Assuming columns A and B are cell array of characters, how about the following? % Sample input table A = {'123';'234';'345'}; ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
plotを使用してグラフの色をデータに応じて変更する方法
以下のように、グラフオブジェクトを構築・可視化する方法はいかがでしょうか? % データ点の(x,y)座標 x = [1,5,10,20]; y = [1,4,5,10]; % Edgeの始点(s),終点(t),重み(w) % ※注:組み合わせ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to filter tables in the cell?
How about the following? C_Winter = cellfun(@(x) x(strcmp(x.season,'Winter'),:),C,'UniformOutput',false); The same solution wi...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to plot binary sine function?
How about modulating a phase with 0 <-> pi ? The following is an example: T = 3; time = linspace(0,T*4,1000); % Create a p...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Box plotのボックス内の色を変更する方法
R2020aでMATLABの基本関数に追加されたboxchartを使うのはいかがでしょうか? たとえば以下のようにすると、Box内と外れ値のマーカー色をグレーに指定することができます。 figure boxchart(x,'BoxFaceColor'...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
make one part of a function repeat it self in diffrent sections of time line.
If you have a Signal Processing Toolbox, you can simply use sawtooth function, like: % Generate signal t = linspace(-4*pi,4*pi...

plus de 6 ans il y a | 0

Réponse apportée
How to Measuring Peak Widths
I believe findpeaks function can do that task. The following is an example: % Load sample data load sunsplot.dat; % Define ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to plot contur in 3 D
OK. Then, how about the following? % Read all the data in the Excel file T = table(); for kk = 1:8 Ttmp = readtable('Conto...

plus de 6 ans il y a | 0

Réponse apportée
Comparing numerical values of a 5x2 cell
I would recommend storing your data as a table variable before processing, like: % Data ca = { 'Red Car', 50; 'Blue Car', 45...

plus de 6 ans il y a | 0

Réponse apportée
extracting index number if an item exist in some columns while not in the rest columns
OK. Then, the solution would be like this: % Sample table Name = {'David','Bowie','Lynch','Mirewuti','Muhetaer','Akira','Agata...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How do I find the column of maximum values of a maxtrix?
If you want to find the column where the maximum value in 2D matrix locates, one simple way is: [~,col] = max(max(x)); For exa...

plus de 6 ans il y a | 0

| A accepté

Charger plus