Beantwortet
Use a vector a range of input values for a function
I think the following is what you want to do. Just FYI, I would recommend replacing '3.14' by |pi| for more precise calculation....

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to create a plot with this values
I believe you can avoid for-loop by vectorizing variables. Assuming h1, hT2s, hT3 and hT4s are constant value, you can calculate...

mehr als 8 Jahre vor | 0

Beantwortet
Adding dots to a box-plot
Since the XTick of the 1st, 2nd... box plots are 1, 2..., x = 0.3 might be too small to display on the graph. If you adjust (x,y...

mehr als 8 Jahre vor | 0

Beantwortet
How to do Delaunay Triangulation and return an adjacency matrix?
By using the output variable of |delaunay| function, you can create adjacency matrix like: % N: Number of points N = 8; ...

mehr als 8 Jahre vor | 2

Beantwortet
ループ、計算したデータを一個一個にtxt書き出す
できれば、forループで計算したデータすべてを保存できるだけの配列をあらかじめ用意しておいて、forループが完了した後、一括でまとめてファイル出力をすることをお勧めします。 もしどうしても1列ごとに出力する必要がある場合、 |dlmwrite| 関数...

mehr als 8 Jahre vor | 3

| akzeptiert

Beantwortet
How to plot a spherical cap in 2-D
I think |fsurf| function would be help, like: funx = @(theta,phi) sin(theta).*cos(phi); funy = @(theta,phi) sin(theta).*si...

mehr als 8 Jahre vor | 1

Beantwortet
insert row into table
How about concatenate 2 tables, and then sort it? Here is an example: % Initial table T = table(... [0;120;160;200],....

mehr als 8 Jahre vor | 3

Beantwortet
3D plot an ellipsoid?
How about using a |fsurf| function, like: a = 2; b = 1; funx = @(theta,phi) a*cos(theta).*cos(phi); funy = @(theta,p...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
How to skip over zero values in an array?
You can also do that by another way, like: idx = abs(dialsound) < eps; arrayout = dialsound(~idx);

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How can I get matlab to draw lines between points?
To draw pentagram, the latter half of your script should be: angle = linspace(0,2*pi,6); x = r*sin(angle); y = r*cos(angl...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to For Loop to merge two images each year in Matlab?
Assuming all your images are '****.png' with the same size and stored in the current folder, the following script can do it. ...

mehr als 8 Jahre vor | 0

Beantwortet
why can't I see line in the plot?
You should slightly modify the second line by: y= 0.6*(x.^3).*(exp(-0.47*x))+1.5*(x.^2).*(exp(-0.6*x)); Then you can obt...

mehr als 8 Jahre vor | 1

Beantwortet
Why my axis have wrong startung date?
I think the following line in your code is causing this problem. set(gca,'XTick',linspace(L(1),L(2),NumTicks)) You shoul...

mehr als 8 Jahre vor | 0

Beantwortet
Gaussian distribution with randn
If you want to generate Gaussian distribution with the given mean and variance (not std), and then extract the values in [min ma...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
How to find the internal and external radius of a ring using matlab image processing toolbox
By measuring the 'equivalent diameter' for each region, you can obtain the inner and outer radius. Here is an example. % Re...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
how can i vectorize this loop?
Seems that you would like to do |circshift| ? Your 'y = ShiftLeft(x)' seems equivalent to 'y = circshift(x,1)', like: x ...

mehr als 8 Jahre vor | 0

Beantwortet
Importing excel data containing previously defined variables
I think the script like this can do what you want. % Read excel file [A,~,raw] = xlsread('yourExcel.xlsx'); % Variabl...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How do I read only numerical data and ignore other text from input file?
Is this what you would like to do? % After textscan C = {'0, 1 !t0, y0';... '1 !tf';... '0.1 !h';... '1 !Eu...

mehr als 8 Jahre vor | 0

Beantwortet
How to edit a text file using matlab?
Here is an another way to do that without using for-loop. % After textscan C = {'1 1 4 0 6';'1 2 9 5 6'}; % Replace s...

mehr als 8 Jahre vor | 0

Beantwortet
how can i plot the function m(t) in matalb?
How about this? % Calculate m(t) between time = 0~0.08 time = 0:0.001:0.08; y = arrayfun(@mt, time); % Plot m(t) ...

mehr als 8 Jahre vor | 0

Beantwortet
Detect longest line in an image
Hi Mihael-san, Thank you for sharing your picture. By detecting the bottom edge of the center black rectangle, I think you ca...

mehr als 8 Jahre vor | 1

Beantwortet
Count dots on dice wich are connected
Since distance between dots on a same dice is shorter than that on the different dice, distance-based clustering technique may b...

mehr als 8 Jahre vor | 2

Beantwortet
Finding X value with known Y value on plot
One possible way to find the threshold-crossing points is interpolating the data by spline function and find the crossing points...

mehr als 8 Jahre vor | 1

Beantwortet
why does `imfill` fill the whole image?
You should delete light area connected to image border before applying |imfill|. By using |imclearborder| function before apply...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
I want to Segment highlighted round area from given below image using matlab code. Can anyone Help ?
Checking the gray-scale level of the bright area, it was found to be >~224, as shown below. <</matlabcentral/answers/uploaded...

mehr als 8 Jahre vor | 1

Beantwortet
fitrgp initial data of kernelparameters and sigma
二乗指数カーネルの場合、KernelParameters は2行1列のベクトル、Sigmaは正のスカラー値として与えることができます。例えば、(x, y) のデータ点群から y = f(x) の回帰モデルを作成する場合、 gprMdl = fit...

mehr als 8 Jahre vor | 2

Beantwortet
Color-Based Segmentation Using the L*a*b* Color Space
Looking at your image, there are obviously 4 colors --- blue, green, red and dark brown (=background). So I believe <https://jp....

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
RMSの算出方法についての質問です。200Hzでサンプリングした加速度波形を100Hz毎のサイズでRMSを算出したいのですが、どのようにすればよいでしょうか?
サンプリング周波数 200Hz で取得された時系列データをもとに、100ms毎のRMS値を計算したいということでしょうか? もしそうであれば、時系列データの配列をもとに 0.1[s]/(1/200[Hz]) = 20 サンプル毎のRMSを計算する、という手...

mehr als 8 Jahre vor | 3

| akzeptiert

Beantwortet
Welchのパワースペクトル密度推定の算出方法について
オーバーラップのサンプル点数やフーリエ変換のサンプル点数を特に指定する必要がなければ、以下のようにして1024 pointのHamming Windowを使用したパワースペクトル密度(横軸:周波数、縦軸:スペクトル密度)を作成することができます。 ...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
Find cell containing part of a string
If your MATLAB is R2016b or later version, you can use |contains| function, like: idx = cellfun(@(x) contains(stringToCheck...

mehr als 8 Jahre vor | 2

Mehr laden