Respondida
Find the missing rows and newly added rows in two different excels sheets
How about the following? % Load the Excel files tNew = readtable('https://jp.mathworks.com/matlabcentral/answers/uploaded_file...

casi 2 años hace | 2

| aceptada

Respondida
MPR-CTを読み込んで3Dとし、一部を球近似することはできますか?
MPR-CT画像から既に 3D モデルは作成済みだと想定します。 3D モデルが 3次元のバイナリイメージの形で利用可能だとすると、regionprops3 関数を使ってそれぞれの重心座標を算出できます。また、この関数でボリュームサイズも取得できますので...

casi 2 años hace | 0

Respondida
Average of every 25 rows in a table
Another possible solution: % Sample data data = rand(1000, 10); % Grouping group = repelem(1:size(data, 1)/25, 25)'; % ...

casi 2 años hace | 1

Respondida
ベクトルと平面のなす角の算出
順を追って説明します。 まず、ベクトル a と b のなす角は以下の式で求められます。 では平面とベクトル a のなす角は??というご質問ですが、考えてみると平面の法線ベクトルを使って求められそうです。 たとえば平面の法線ベクトルを n とすると...

casi 2 años hace | 2

Respondida
Storing values in a matrix out of nested for loops
how about the following? m1 = [0.5; 0.5]; m2 = [0.6; 0.4]; m3 = [0.2; 0.8]; [q, p, r] = meshgrid(m2, m1, m3); s4 = p.*q.*r;...

casi 2 años hace | 1

| aceptada

Respondida
データ数の圧縮,リサンプリング,補間について
時系列信号のリサンプリングに関するご質問と想定して回答します。 ご理解のとおり、resample 関数を使ってこの課題を解決するには、目標のサンプル点数に対応するサンプリング周波数を求める必要があります。 もっと簡単な別の方法として、関数 interp...

casi 2 años hace | 0

| aceptada

Respondida
Read csv file 2 and 3rd row and store them in different matrices
How about the following? % File path url = 'https://jp.mathworks.com/matlabcentral/answers/uploaded_files/978985/2022-04-22%2...

casi 2 años hace | 1

| aceptada

Respondida
How to convolve a 3D matrix along one of its dimension?
The function smoothdata must be applicable, like: % Sample data A = rand(100, 100, 2000); % Gaussian filter window win = 1...

casi 2 años hace | 1

Respondida
This file format i want to extract time and Value. What should I do??
How about the following? % Read and arange the data url = 'https://jp.mathworks.com/matlabcentral/answers/uploaded_files/97604...

alrededor de 2 años hace | 1

Respondida
フォルダー内の画像のlab値を読み取り,それぞれの値を変数l,a,bに代入する.
以下のような処理のイメージでしょうか? % フォルダー内の画像を読み取る. I = imread('peppers.png'); % 画像のlab値を読み取る. Ilab = rgb2lab(I); % 変数l,a,bを定義し,画像のla...

alrededor de 2 años hace | 0

| aceptada

Respondida
行列の各行に対してラベル付け
グラフ理論を使う方法はどうでしょうか? 配列Aの各要素をノード番号、各行をエッジとみなすと、配列からグラフGを構成することができます。 すると、「求めたいラベル番号」は「エッジが属するサブグラフの番号」と等価になります。 言葉だけでは分かりにくいと思...

alrededor de 2 años hace | 2

| aceptada

Respondida
BPSK modulatorブロックの搬送周波数について
おそらく BPSK Modulator Baseband ブロックに関するご質問かと思いますが、このブロックは名称のとおりベースバンド信号を生成します。このため、ある搬送波周波数 [Hz] のBPSK信号を生成するには、このブロックの出力を別途 でアッ...

alrededor de 2 años hace | 0

| aceptada

Respondida
Vector to Indicate if Data equals the Maximum by group
How about the following? data = [1;2;3;6;5]; group = [1;1;2;3;3]; idx = splitapply(@(x) {x == max(x)},data,group); idx = c...

alrededor de 2 años hace | 1

| aceptada

Respondida
2つ以上の同じ要素を持つ列を削除
arrayfun 使った別の方法: % 配列の一例 (行・列数は任意) A = [... 1 2 3 4 5;... 2 3 4 4 6;... % -> 削除 7 5 5 5 2;... % -> 削除 0 9 7 8 1];...

alrededor de 2 años hace | 1

Respondida
Finding the value of the below curve
If you have a Signal Processing Toolbox, pulsewidth function will be a simple and effective solution.

alrededor de 2 años hace | 1

Respondida
finding the slope of each segement in a fitted curve
By applying interpolation, you can decrease and, as a result, the deviation will be more accurate. The following is an example...

alrededor de 2 años hace | 2

Respondida
Plot summation series | For Loop | Creep Strain
How about the following? s = 100; % constant tensile stress, (MPa) t = linspace(0, 10000)'; % duration of applied stress on sp...

alrededor de 2 años hace | 0

Respondida
構造体から特定のデータを抜き出す方法
関数 structfun をうまく使うと、ID = true の要素だけを抽出した構造体 t01_ver1 を作成することができます(下記 Solution 1)。 ただ、このようなデータであればテーブル型変数にしたほうが扱いやすいと思いますので、テーブ...

alrededor de 2 años hace | 0

Respondida
Finding the number of edges per each node in a graph
Please reffer to the degree function.

alrededor de 2 años hace | 0

| aceptada

Respondida
Convert a table vector of 31 by 13 elements to matrix of 13 by 31.
How about the following solution? % Read data file L = readlines('https://jp.mathworks.com/matlabcentral/answers/uploaded_file...

alrededor de 2 años hace | 0

| aceptada

Respondida
Inserting a column of repeated values
How about the following method? % Sample data load('outdoors.mat'); T = timetable2table(outdoors); T.Humidity([1, 6, 15]) = ...

alrededor de 2 años hace | 1

| aceptada

Respondida
Combination of DATA in arrange manner
How about the following? % Create D and E D = -0.02+0.0001*(0:70); E = 160:200; % Apply meshgrid function [xg, yg] = mesh...

alrededor de 2 años hace | 1

| aceptada

Respondida
Find out the cell index from matric values
How about using histcount2 ? The following is an example: % Sample data A = [... 0.7, 0.1;... 0.1, 0.2;... 0.8, 0.6;...

alrededor de 2 años hace | 0

| aceptada

Respondida
Best way to get rid of/ prevent function from creating complex numbers?
How about using isreal function?

alrededor de 2 años hace | 0

Respondida
Create all permutations of 1x13 vector used for Leave-p-out Cross-Validation
How about the following? Though this generates 78x11 (instead of 13x78 which you expected), the result contains all possible co...

alrededor de 2 años hace | 0

Respondida
return value of [ ] for an 'if' or 'for' function
How about the following? function output = yourFunction(input) if isempty(input) output = 'unknown'; elseif isa(input,'n...

alrededor de 2 años hace | 0

| aceptada

Respondida
How to speed up my code?
Avoiding for-loop will enhance computational efficiency. For example, the first for-loop: for i=1:n2 K(:,:,i)=M(:,:,i); en...

alrededor de 2 años hace | 0

| aceptada

Respondida
How to use 'mkdir' command to make folders labelled as 1, 2, 3 till 100 using for loop in matlab code?
How about the following? rootFolder = 'E:\P2'; for kk = 1:100 subFolder = num2str(kk); folderPath = fullfile(rootFolde...

alrededor de 2 años hace | 0

| aceptada

Respondida
How to calculate the number from a database
How about the following? List = arrayfun(@(x) x.country, TV,... 'UniformOutput', false); [Group, Country] = findgroups(Li...

más de 2 años hace | 1

| aceptada

Respondida
行列からある条件を満たした部分以降を抽出する方法
find 関数を使う下記の方法ではいかがでしょうか? % A の2列目が >= 1 となる最初の行番号を pt として取得 pt = find(A(:,2) >= 1, 1); % pt行目から最後までの行を配列 B として保存 B = A(p...

más de 2 años hace | 1

Cargar más