Réponse apportée
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...

plus de 2 ans il y a | 0

| A accepté

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

plus de 2 ans il y a | 1

| A accepté

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

plus de 2 ans il y a | 1

Réponse apportée
Assign number to certain value in cell
How about using ismember function? Like: % Sample cell arrays A = {'As', 'C', 'H', 'N'}; B = {'As', 'As', 'N', 'N', 'H', 'H',...

plus de 2 ans il y a | 0

Réponse apportée
replacing numbers with alphabets/letters in a matrix
One possible straight-forward solution would be like this: M = readmatrix('testfile_0.50.xlsx'); C = cell(size(M)); idx = i...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Assign partnames to two different tables with measurement datas
I wouold recommend using innerjoin or outerjoin functions for this kind of task.

plus de 2 ans il y a | 0

Réponse apportée
Is there an alternative to eval in a struct?
I believe it's better to arrange the data as a table rather than the deeply nested structure. How about the following? subject ...

presque 3 ans il y a | 1

Réponse apportée
Need help asking for an input sentence
To input a text, you should use 's' option, like: N = input('what is N?: ') A = input('give me a sentence!: ','s');

presque 3 ans il y a | 0

Réponse apportée
MATLABのウィンドウの長さとは、何を意味しているのでしょうか。
以下の説明が参考になるかと思います。 https://jp.mathworks.com/help/reinforcement-learning/ref/rltrainingoptions.html#mw_9b790efc-2a22-481b-a5f9-1...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Storage results in an array
Instead of uisng for-loop, you can do this task by vectorizing, like: x = [2, 3, 4, 5, 6]; y = x + 2; idx = x > 4; y(idx) = ...

presque 3 ans il y a | 0

Réponse apportée
3次元から2次元に形状変換
下記の方法ではいかがでしょうか? % 変数 A はサイズが 3×3×100 の3次元配列と想定 A = reshape(permute(A, [2 1 3]), 1, [], 100); A = squeeze(A)'; 例: % 簡単のため 3...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
乱数について
以下のような方法はどうでしょうか? >・乱数を使用して作る >・乱数を使用して0.5以上は1、0.5未満は0といったようにしたい。 この部分は、結局のところ行列の各要素が 1/2 の確率で 0 か 1 となるため、randi 関数を使用しまし...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I write a csv file by row or by column
How about the following? % Sample data (1-by-3 cell array) output = {... uint8(randi([0 255],100,1)),... uint8(randi([0 ...

presque 3 ans il y a | 0

Réponse apportée
非表示にしたfigureが複数ある場合において,編集対象の「現在のfigure」を非表示のまま変更したい
figure を作成する際にあらかじめ figure ハンドルを取得しておくことで、gcf を使わなくてもそれぞれの figure を操作可能です。例えば、以下のようにすれば 2 つの figure に対するハンドル hFig1, hFig2 を取得できま...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Excluding types of extension files on a loop
You can do that more effective way by using wild card character "*", like: imgFolder = pwd; % <- set to your image folder path ...

presque 3 ans il y a | 2

Réponse apportée
Tableからデータを抽出する方法
下記のような方法はいかがでしょうか? % データ読み込み T = readtable('Book2.xlsx'); % xのdiffを取る (xが一定の区間は0となる) d = [0; diff(T.x)]; % xが増加している部分 (...

presque 3 ans il y a | 0

Réponse apportée
how to generate and cover all the possible arrays using two enties
Another possible solution: [p,q,w,s] = ndgrid({'H','C'}); A = [p(:),q(:),w(:),s(:)]; disp(A)

presque 3 ans il y a | 0

Réponse apportée
イメージの行列の計算について
小数点以下が切り捨てられてしまうのは、読み込んだ画像が uint8 型の配列としてワークスペースに取り込まれるためです。いったん double 型の配列に変換したうえで 255 で割る、ということもできますが、0~1 の範囲にスケーリングしたいということで...

presque 3 ans il y a | 2

| A accepté

Réponse apportée
how to convert bmp image to Bpg
Unfortunately, currently BPG image format is not supported. As a workaround, how about installing bpgenc from the following sit...

presque 3 ans il y a | 0

Réponse apportée
散布図上で円のフィッティング
いろいろな解決法があるかと思いますが、fminsearch を使って円をあらわす式の係数を推定するのはいかがでしょうか? 以下はその一例です。 x = [x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12]; y = [y1...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
Bit Error Rate (BER) performance of different digital modulation schemes such as Binary Phase Shift Keying (BPSK),
I believe the following documentation page would be help: https://jp.mathworks.com/help/comm/ref/berawgn.html

presque 3 ans il y a | 1

Réponse apportée
Add missing numbers of 0's and 1's in an array
How about the following? % Sample data x = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0]; % Calculate run...

presque 3 ans il y a | 0

Réponse apportée
Read csv-style file with header and subtitle
How about the following solution? T = string(readcell('tableExample.csv'));

presque 3 ans il y a | 0

| A accepté

Chaîne


Data

presque 3 ans il y a

Réponse apportée
What methods can be used for lossless audio compression?
I believe the most simplest way to save data as a lossless audio file using MATLAB is audiowrite. This function can save data a...

presque 3 ans il y a | 1

Réponse apportée
get the distances between points
How about the following solution? load('xy_coordinate.mat'); % Calculate distance between each node D = pdist(xy); % Con...

presque 3 ans il y a | 2

| A accepté

Réponse apportée
How to export array elements?
How about the following? A = (1:20)'; N = numel(A); idx = mod(0:N-1,10)' <= 1; X = cell(5,1); for kk = 1:5 X{kk} = A...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
char array to pick
The solution should be: b = a(:,2:3);

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Help with findgroups command
Like this? a = {... 'apples' 1 2;... 'orange' 2 3;... 'apples' 3 4;... 'Pear' 4 5;... 'apples' 5 6;}; % Ext...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
List of Node pairs
Another possible solution: numNode = 4; [r,c] = find(~eye(numNode)); v = [c,r]; >> v v = 1 2 1 3 ...

environ 3 ans il y a | 1

| A accepté

Charger plus