Answered
リアルタイムでのデータ取得とシミュレーション
リアルタイムでiPhoneのセンサデータを取得したいということでしたらこちらが利用できるのではないでしょうか。 https://jp.mathworks.com/help/matlabmobile/sensor-data-collection.html

nästan 4 år ago | 0

Answered
csvファイルの一括インポートおよび一括処理
例えば、1列目に要素番号、2列目にランダムな数が5つ並んだcsvファイルが3つあり、それぞれファイル名がfile1.csv、 file2.csv、 file3.csvとなっているとします。以下のコードでサンプルファイルを生成できます。 % サンプルデータ...

nästan 4 år ago | 2

Answered
How iterate inside a excel file and every 21 rows store values in a matrix?
How about saving to a cell array? sheet1 = 'VolumeTracings - Copy'; [XY,fileName] = xlsread('VolumeTracings - Copy.csv',sheet1...

nästan 4 år ago | 1

| accepted

Answered
Reading and writing a 2-column table of strings to text file
You can find many ways by following the links below. https://www.mathworks.com/help/matlab/text-files.html

nästan 4 år ago | 0

| accepted

Answered
Opening Multiple Windows To Analyze Different Plotted Variables
You can create a new window with the 'figure' command. x = linspace(0,2*pi,100); y1 = sin(x); y2 = cos(x); plot(x,y1); figu...

nästan 4 år ago | 0

| accepted

Answered
For Loop using values from x axis
For example, you can check whether x is greater than 24 without using for loops. x=-400:400; x(x>=24) When using a for loop ...

nästan 4 år ago | 0

Answered
Draw an angle for two functions
I think there are other better ways... f = @(x) (tan((31.157/180) * pi) * x) - ((9.81*x.^2)/(2*25*25*(cos((31.157/180)*pi))^2))...

nästan 4 år ago | 0

| accepted

Answered
分数関数の使い方が知りたいです.
行列の乗算ではなく要素単位の乗算を実行するには、.* 演算子を使用します。割り算、べき乗も同じです。 x = linspace(-2,2,100); y = 1 ./ (3*x.^2 + 2*x + 4); plot(x,y);

nästan 4 år ago | 1

| accepted

Answered
単振動をオイラー法で数値シミュレーション
エラーが出る理由はy(i+1)という一つの要素にy(i)+v*hという配列を代入しようとしているからです。y(i)+v*hが配列になってしまうのはvが配列であるからで、vが配列になってしまうのは v=A*omega*cos(omega*t+alpha);...

nästan 4 år ago | 0

| accepted

Answered
片対数グラフの描写について.
semilogxでプロットする前にhold onしているからです。 hold onを消してみてください

nästan 4 år ago | 1

| accepted

Answered
三次元スプライン補間の詳細について
ダウンサンプリングしたデータから元の波形をアップサンプリングによって復元したいということですか? 以下にコードを示しながら説明します。 分かりやすいようにサンプル数nとサンプリング時間間隔dtを変更しています。 %初期設定 n = 64; ...

ungefär 4 år ago | 0

Answered
How to write this transfer function in matlab ? (s+2)(s+1)/(s+3)(s+2)(s+1)+0.012(s+1)+(0.16(s+2)
Please refer to the following link. <https://jp.mathworks.com/help/control/examples/plotting-system-responses.html?lang=en Plot...

ungefär 4 år ago | 0

Answered
for文でのデータ蓄積
plotを重ねたいときはfigureをhold onしてください.こんな感じです for j=1:681 tic t=abs(A2(j)); z=A(j); n=angles(j); if t<5 ...

ungefär 4 år ago | 1

Answered
ガウスフィッティングした後,フィッティング曲線のピーク位置を取得したいです.
近似関数の値を評価したい場合は、f(10)のようにするとx=10の点での値を評価できます。 以下に関数値を評価してピーク値を算出する例を示しますが,コード後半にあるように,微分値が0になる位置を補間によって求める方が少ない評価点で正確にピーク位置が求まり...

ungefär 4 år ago | 0

| accepted

Answered
不規則に変化する無数のデータを一つの数式を経由させることで一定の値に近づける関数の求め方
無理矢理ある値に収束させたいなら近似式を導出するというよりはある値に収束する関数(例えば指数関数)を変形するのがいいのではないでしょうか。例えば指数関数を使ってこんな関数を考えることができます。 これはx=0でf=y(1)、x→∞で→Rとなる関数です...

ungefär 4 år ago | 0

| accepted

Answered
左辺の添字インデックスになる配列(左辺の配列より要素数が多い)に複数の同値がある場合、右辺の配列の対応値をすべて左辺の配列の添字インデックスにあたる位置に加算する方法について
素敵な関数がありました.累算による配列作成 b = [1,1,2,2,2,3,4,5]; % 添字配列 c = [1,2,3,4,5,6,7,8]; % sample a = accumarray(b(:),c(:))';

ungefär 4 år ago | 1

Answered
左辺の添字インデックスになる配列(左辺の配列より要素数が多い)に複数の同値がある場合、右辺の配列の対応値をすべて左辺の配列の添字インデックスにあたる位置に加算する方法について
for文使わない方法はまだ考え中ですが,こういうのはどうですか? a = zeros(1,5); b = [1,1,2,2,2,3,4,5]; % 添字配列 c = [1,2,3,4,5,6,7,8]; % sample for i=1:l...

ungefär 4 år ago | 0

Answered
複数のテキストファイルを読み込みと変数の作成
fid=fopen('point1_%d.txt','r',i); のところを fname=sprintf('point1_%d.txt',i); fid=fopen(fname,'r'); とするのはどうですか?

ungefär 4 år ago | 0

| accepted

Answered
How can I extract the data (values) which are comming under the line
How about interpolation? clear close all clc [X,Y,Z] = peaks(50); % sample figure map = pcolor(X,Y,Z); map.EdgeAlp...

ungefär 4 år ago | 0

Answered
z=xtanθを求めたい
こんなかんじでしょうか. theta = 30*pi/180; x = 600; z = x*tan(theta)

ungefär 4 år ago | 0

| accepted

Answered
配列への代入結果をコマンドウィンドウに表示させないようにしたい
ステートメントの最後にセミコロンをつけると、計算はしますが表示はされません。 オレンジの波線が引かれているところだと思いますよ。 <https://jp.mathworks.com/help/matlab/learn_matlab/desktop.ht...

ungefär 4 år ago | 3

| accepted

Answered
figureの複製方法について
copyobj関数を使うと良いと思います。 同様の質問がありますので以下を参考にしてください。 <https://jp.mathworks.com/matlabcentral/answers/83609-how-to-copy-a-figure-in-...

mer än 4 år ago | 3

Answered
アニメーションでグラフの軌跡を表示
こちらが参考になるかとおもいます.

mer än 4 år ago | 5

| accepted

Answered
Calculate table column with a loop
table = rand(200,120); %sample data [row,col] = size(table); for i = 1:col-1 variable1(:,i) = table(:,i+1) - table(...

mer än 4 år ago | 1

Answered
hold on for double plots in one loop
Try changing the plot target by referring to the link below. Working with Multiple Figures Simultaneously

mer än 4 år ago | 0

Answered
How to load *.mat files named as File-0-0.mat, File-0-1.mat and so on in Matlab. I want to do this automatically in a loop. Do anyone have idea about this thing? Please let me know.
read this <https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html Import or Export a Sequence of ...

mer än 4 år ago | 0

| accepted

Answered
Need help fixing my ODE45 script
Since you want to detect when the position becomes zero, the correct description is as follows. check = y(1);

mer än 4 år ago | 2

| accepted

Answered
行列のデータ点から滑らかな3D図をつくる方法
内挿補間するのはどうでしょうか。例をあげときます。 グリッドデータの内挿 [X,Y] = meshgrid(-1:.3:1,-2:.3:2); V = 0.75*Y.^3 - 3*Y - 2*X.^2; mesh(X,Y,V); F = gr...

mer än 4 år ago | 3

| accepted

Answered
行列から条件を指定して値を取り出す
find関数を使うといいと思います.非ゼロ要素のインデックスと値を見つける A=[1 -66 ; 2 -61 ; 3 -65 ; 3 -64 ; 1 -66]; row = find(A(:,1)==3); % Aの1列目が3である行を抽出 B...

mer än 4 år ago | 9

| accepted

Answered
2枚以上のfigureを並べる方法
最も簡単な方法は新しくFigureウィンドウを作成することです。 Figureウィンドウの作成 L1 = tf(4, [1 3 6 12 8 ]) L2 = tf(16, [1 3 6 12 8 ]) nyquist(L1, L2) figure...

mer än 4 år ago | 8

| accepted

Load more