統計
All
Feeds
回答済み
How to calculate distance between center of white pixels in an image?
You can find the center (centroid) of each white region using REGIONPROPS, and then just calculate the distance between the cent...
How to calculate distance between center of white pixels in an image?
You can find the center (centroid) of each white region using REGIONPROPS, and then just calculate the distance between the cent...
約5年 前 | 1
回答済み
Calculating Angle Between Two Vectors / Three Points
The units on the axes are very different. Displacement is around +/- 3 while shear is around +/- 80, so the calculated angles f...
Calculating Angle Between Two Vectors / Three Points
The units on the axes are very different. Displacement is around +/- 3 while shear is around +/- 80, so the calculated angles f...
5年以上 前 | 1
| 採用済み
回答済み
solve and plot a system of nonlinear 2nd order differential equations
If you just need a plot and not a closed-form solution, then I'd recommend just using ODE45 without worrying about symbolic stuf...
solve and plot a system of nonlinear 2nd order differential equations
If you just need a plot and not a closed-form solution, then I'd recommend just using ODE45 without worrying about symbolic stuf...
5年以上 前 | 1
| 採用済み
回答済み
Figure作成時にNaNとInfだけ黒に指定する方法
NaNやInfを透明にして、背景を黒にすることは一つにアイディアです。 例えば: rng(0); X = peaks(20); % 適当なデータを作成 X(randperm(numel(X),3)) = nan; % 適当にNaNを入れる X(r...
Figure作成時にNaNとInfだけ黒に指定する方法
NaNやInfを透明にして、背景を黒にすることは一つにアイディアです。 例えば: rng(0); X = peaks(20); % 適当なデータを作成 X(randperm(numel(X),3)) = nan; % 適当にNaNを入れる X(r...
5年以上 前 | 5
| 採用済み
回答済み
Up-sampling in convolutional neural network
I think you may be able to do it using a transposedConv2dLayer. This works, (though I'm not entirely confident that this is the ...
Up-sampling in convolutional neural network
I think you may be able to do it using a transposedConv2dLayer. This works, (though I'm not entirely confident that this is the ...
5年以上 前 | 0
回答済み
how to overlay(superimpose) contour plot(coloured) over a gray scale image
A grayscale image with a colored contour plot superimposed: % Make some sample grayscale image I = abs(sin((1:500)'/100)*sin((...
how to overlay(superimpose) contour plot(coloured) over a gray scale image
A grayscale image with a colored contour plot superimposed: % Make some sample grayscale image I = abs(sin((1:500)'/100)*sin((...
6年弱 前 | 1
| 採用済み
回答済み
Simultaneously numerically integrate coupled ODE's in MATLAB
You can get dx2/dt by multiplying dx2/dx1 * dx1/dt. As a simple example say (I'll use x and y instead of x1 and x2 cause it's...
Simultaneously numerically integrate coupled ODE's in MATLAB
You can get dx2/dt by multiplying dx2/dx1 * dx1/dt. As a simple example say (I'll use x and y instead of x1 and x2 cause it's...
6年以上 前 | 0
回答済み
I need to overlay a color map over a gray scale image with with the colorbar on the side.
Something like this maybe? figure; ax1 = axes; imagesc(x); colormap(ax1,'gray'); ax2 = axes; imagesc(ax2,T...
I need to overlay a color map over a gray scale image with with the colorbar on the side.
Something like this maybe? figure; ax1 = axes; imagesc(x); colormap(ax1,'gray'); ax2 = axes; imagesc(ax2,T...
6年以上 前 | 5
| 採用済み
回答済み
How can I plot the graph of a gyroid which is composed of 3 variables in the form of F(x,y,z)=t
fimplicit3(@(x,y,z) sin(x).*cos(y)+sin(y).*cos(z)+sin(z).*cos(x)) Note that for element-wise multiplication I made sure to ...
How can I plot the graph of a gyroid which is composed of 3 variables in the form of F(x,y,z)=t
fimplicit3(@(x,y,z) sin(x).*cos(y)+sin(y).*cos(z)+sin(z).*cos(x)) Note that for element-wise multiplication I made sure to ...
7年弱 前 | 1
| 採用済み
回答済み
数値積分を行う上でIntegralの扱い方
割り算のところで / を使っていますが、それに点をつけて ./ にする必要があります。 ntf = @(x) abs(((1i*2*pi*x).^3)./((1i*2*pi*x).^3+k1*(1i*2*pi*x).^2+k2*(1i*2*p...
数値積分を行う上でIntegralの扱い方
割り算のところで / を使っていますが、それに点をつけて ./ にする必要があります。 ntf = @(x) abs(((1i*2*pi*x).^3)./((1i*2*pi*x).^3+k1*(1i*2*pi*x).^2+k2*(1i*2*p...
7年弱 前 | 1
| 採用済み
回答済み
Simulink上で計算した値をMatlabの.mファイルの計算部分に組み込む方法はありますか?
まず出力したい信号にOutportをつなげて、 <https://www.mathworks.com/help/simulink/slref/outport.html> "sim" コマンドでモデルを実行し、出力の値を取得したらどうでしょうか。...
Simulink上で計算した値をMatlabの.mファイルの計算部分に組み込む方法はありますか?
まず出力したい信号にOutportをつなげて、 <https://www.mathworks.com/help/simulink/slref/outport.html> "sim" コマンドでモデルを実行し、出力の値を取得したらどうでしょうか。...
7年弱 前 | 4
回答済み
Vectorization, check if points coordinate is exist in an image or no
signVector = ones(size(coordinates,1),1); inds = sub2ind(size(N),coordinates(:,1),coordinates(:,2)); % Convert to linear in...
Vectorization, check if points coordinate is exist in an image or no
signVector = ones(size(coordinates,1),1); inds = sub2ind(size(N),coordinates(:,1),coordinates(:,2)); % Convert to linear in...
7年弱 前 | 0
| 採用済み
回答済み
How to find volume under fitted data?
If you have a function y = f(r), which it sounds like you do since you have a polynomial, then you can use integral. y = ...
How to find volume under fitted data?
If you have a function y = f(r), which it sounds like you do since you have a polynomial, then you can use integral. y = ...
7年弱 前 | 0
| 採用済み
回答済み
InterX issues. Showing intersection when there is none.
The intersections are actually there. The issue is just in plotting. Straight lines between two points aren't straight on a s...
InterX issues. Showing intersection when there is none.
The intersections are actually there. The issue is just in plotting. Straight lines between two points aren't straight on a s...
7年弱 前 | 1
| 採用済み
回答済み
How do I solve a second order non linear differential equation using matlab.
syms z(t) t A B zp = diff(z,t); zpp = diff(z,t,2); eqn = ( zpp + A*zp^2 == B ); cond = [z(0)==0, zp(0)==0...
How do I solve a second order non linear differential equation using matlab.
syms z(t) t A B zp = diff(z,t); zpp = diff(z,t,2); eqn = ( zpp + A*zp^2 == B ); cond = [z(0)==0, zp(0)==0...
7年弱 前 | 2
回答済み
Moving a curve in one axis to ascertain area under the curve is zero
Calculate the value of the integral when d_opt = 0, and then use that to set d_opt to cancel the integral out. b = 0.1; ...
Moving a curve in one axis to ascertain area under the curve is zero
Calculate the value of the integral when d_opt = 0, and then use that to set d_opt to cancel the integral out. b = 0.1; ...
7年弱 前 | 1
回答済み
How to input transfer function without simplifying it?
s = tf('s') G = (s+2)/(s*(s-1)*(s+6)^2) This gives a transfer function (tf) with the polynomials expanded G = ...
How to input transfer function without simplifying it?
s = tf('s') G = (s+2)/(s*(s-1)*(s+6)^2) This gives a transfer function (tf) with the polynomials expanded G = ...
7年弱 前 | 5
| 採用済み
回答済み
Matlab's quad equals 0 when over 0 to 6 and actual value over 3 to 5
First, QUAD is very outdated, <https://www.mathworks.com/help/matlab/ref/integral.html INTEGRAL> (introduced in R2012a) is recom...
Matlab's quad equals 0 when over 0 to 6 and actual value over 3 to 5
First, QUAD is very outdated, <https://www.mathworks.com/help/matlab/ref/integral.html INTEGRAL> (introduced in R2012a) is recom...
7年弱 前 | 1
| 採用済み
回答済み
How to ensure text on plot always in front?
One workaround would be to create an invisible axes on top, and then put the text in there. figure ax1 = axes; mesh(a...
How to ensure text on plot always in front?
One workaround would be to create an invisible axes on top, and then put the text in there. figure ax1 = axes; mesh(a...
約7年 前 | 2
| 採用済み
回答済み
複数入力があるときのモデル同定(System Identification toolbox)
はい、多入力多出力モデルの同定も可能です。 例えば: <https://jp.mathworks.com/help/ident/examples/dealing-with-multi-variable-systems-identification-...
複数入力があるときのモデル同定(System Identification toolbox)
はい、多入力多出力モデルの同定も可能です。 例えば: <https://jp.mathworks.com/help/ident/examples/dealing-with-multi-variable-systems-identification-...
約7年 前 | 3
| 採用済み
回答済み
looking for something similar for maximum filter calculation
Yes, in MATLAB the function is <https://www.mathworks.com/help/images/ref/imdilate.html IMDILATE>. The "NHOOD" argument is an...
looking for something similar for maximum filter calculation
Yes, in MATLAB the function is <https://www.mathworks.com/help/images/ref/imdilate.html IMDILATE>. The "NHOOD" argument is an...
約7年 前 | 1
| 採用済み
回答済み
Applying equation to each field in a structure
For 4 variables, copy/pasting seems doable, but if you had a lot more I can see how it could be cumbersome. This is a soluti...
Applying equation to each field in a structure
For 4 variables, copy/pasting seems doable, but if you had a lot more I can see how it could be cumbersome. This is a soluti...
約7年 前 | 0
回答済み
Would be possible to calculate half hour average by using retime?
Yes, there is an example a little bit down the in the documentation for <https://www.mathworks.com/help/matlab/ref/retime.html R...
Would be possible to calculate half hour average by using retime?
Yes, there is an example a little bit down the in the documentation for <https://www.mathworks.com/help/matlab/ref/retime.html R...
約7年 前 | 1
| 採用済み
回答済み
How to save an axes within a GUI to a .fig
This might work. You create a new (temporary and invisible) figure, and then use COPYOBJ to copy that axes to the new figure. Y...
How to save an axes within a GUI to a .fig
This might work. You create a new (temporary and invisible) figure, and then use COPYOBJ to copy that axes to the new figure. Y...
約7年 前 | 4
| 採用済み
回答済み
Is there any way I can make the attached contour plots more smooth ?
Maybe a median filter? However ORDFILT2 needs the Image Processing Toolbox. Z = peaks(501); % Sample data Z = Z +0.1*ran...
Is there any way I can make the attached contour plots more smooth ?
Maybe a median filter? However ORDFILT2 needs the Image Processing Toolbox. Z = peaks(501); % Sample data Z = Z +0.1*ran...
約7年 前 | 0
回答済み
Why is getting Uniform Random Numbers so difficult!?!?
Try putting the seed value to: randi(intmax)
Why is getting Uniform Random Numbers so difficult!?!?
Try putting the seed value to: randi(intmax)
約7年 前 | 0
| 採用済み
回答済み
Double integral with one integral having limits as a function of other variable
You can put functions inside of functions %% Embed A into fun_Z0, and tell INTEGRAL to only accept scalar inputs l1=3e...
Double integral with one integral having limits as a function of other variable
You can put functions inside of functions %% Embed A into fun_Z0, and tell INTEGRAL to only accept scalar inputs l1=3e...
約7年 前 | 0
| 採用済み
回答済み
Where is the issue in my "while" statement?
You were on the right track. This gives 2520: n=1; while any( mod(n,1:10)~=0 ) n=n+1; end n Whe...
Where is the issue in my "while" statement?
You were on the right track. This gives 2520: n=1; while any( mod(n,1:10)~=0 ) n=n+1; end n Whe...
約7年 前 | 0
回答済み
Numerical Integration with Parameters
For example, if the function is f(x) = 1+s*x+b*x^2 and you're integrating from 0 to 1, and you want to find the b (numerically) ...
Numerical Integration with Parameters
For example, if the function is f(x) = 1+s*x+b*x^2 and you're integrating from 0 to 1, and you want to find the b (numerically) ...
8年弱 前 | 0
回答済み
System of differential equations with constant (as variables) coefficients
As has been mentioned, with the k's explicitly accounted for, it's very complicated. But if you consider the matrix X simply ...
System of differential equations with constant (as variables) coefficients
As has been mentioned, with the k's explicitly accounted for, it's very complicated. But if you consider the matrix X simply ...
8年弱 前 | 2