回答済み
2D contour plot considering the boundary of data
[x, y, z] = peaks(40); h = pcolor(x, y, z); h.EdgeColor = 'none'; % Now plot a mask hold on ps = polyshape([-1 -1 1 1], [...

5年弱 前 | 0

回答済み
trying to plot multiple y axis
% data x = (0:.1:4)'; y = [cos(2*x) exp(x) x.^2 5*sin(4*x)]; % Plot on the left and right y axes using yyaxis hax1 = axe...

5年弱 前 | 2

回答済み
How can i transfer a specific number in matrix to another number along the solution matrix??
x = [1,1,0,0]; % binary A = [-27, -10, -11, -25]; idx = find(x); [~, i0] = max(A(idx)); A(idx(i0)) = 0; A % A = [-27, ...

5年弱 前 | 0

回答済み
my code is not running
This is my best guess. for year = 2009:2017 year_index = year-2008 % no space in variable names year_struct = load...

5年弱 前 | 0

| 採用済み

回答済み
indexing with isnan in multidimensional arrays
% A small matrix with nans a=randn(6, 3); a([2 11 13])=nan % idx idx = ~isnan(a) a(idx) So a(idx) is a colum matrix based ...

5年弱 前 | 0

回答済み
uneven distributed points in polarscatter
polarscatter use radian instead of deg b=0:10:350; polarscatter(deg2rad(b),ones(size(b)),100,ones(size(b)),'filled')

5年弱 前 | 1

| 採用済み

回答済み
How to make complete graph from co-ordinates.
Show the node name, edge weight/distance, and node coordinates x=[0.3 ,5.6 , -8.4,6.4 ]; % These are my x-cordinates y=[4.6, 6...

5年弱 前 | 0

| 採用済み

回答済み
Why does plot(X,Y,'or') and plot(X,Y) give different results
The line plot draws line from one point to another point. The order of points is thus important. The 'or' option just plots th...

5年弱 前 | 0

回答済み
How to plot heat map using MATLAB?
a = peaks(40); imagesc(a) colormap(hsv(512)) colorbar

5年弱 前 | 1

| 採用済み

回答済み
Is it possible to have function handles with optional arguments in Matlab
With anonymous function, you can take in the argument in workspace instead of function arguments. a = 1; b = 2; c = 1; f = @(x...

5年弱 前 | 0

回答済み
How can I change the label for my elements with same name?
A = {'1_01';'1_01';'1_01';'1_02';'1_02'}; uA = unique(A); B = A; for i=1:length(uA) idx = find(strcmp(A, uA(i))); f...

5年弱 前 | 0

| 採用済み

回答済み
Write Without using loop
Not sure if you have given the correct equations: % Specify n, t and x n = 10; t = (1:n)'; x = randn(n, 1); % generate...

5年弱 前 | 0

回答済み
FFT of quantized signal
Quantizing the ideal sinusoidal signal will produce a perodical signal, which may have some weird spectrum with 0 at some freque...

5年弱 前 | 0

回答済み
Can u use filtfilt with structfun?
cheby_hp = designfilt('highpassiir', 'FilterOrder', 10, 'StopbandFrequency', 0.4, 'StopbandAttenuation', 80, 'SampleRate', 200);...

5年弱 前 | 1

回答済み
Warning: Matrix is singular to working precision.
A=[1 1 1 1 0 ; 1 1 1 1 1 ; -1 -1 -1 -1 1 ;-778.8791468 -346.4077963 -149.2503011 -149.2503011 -163.019189 ; 16.28468788 201.1553...

5年弱 前 | 0

回答済み
draw a function in the matlab
a=0; k = (-10:1:10)*2*pi; g = -2*pi./(4*pi^2+(a-k*1i).^2) +2*pi./(4*pi^2+(a+k*1i).^2) -(a-k*1i)./(36*pi^2+(a-k*1i).^2) +... ...

5年弱 前 | 0

回答済み
plot for a numerical question
Assume x, k, a are real, a>0. Then . Similarly . Then your formula can be much simplified.

5年弱 前 | 0

回答済み
how to create a sequence with percentage increments
n = 10; x = 3*1.1.^(0:n-1)

5年弱 前 | 1

回答済み
How to integrate 3-dimensional numerical array into one dimension using Parallel Computing Toolbox?
Xd= distributed(X, 3) % distributed along 3rd dim Y = trapz(Xd, 3); % trapz support parallel processing for dis...

5年弱 前 | 0

| 採用済み

回答済み
Change eye diagram plot color into black on white
get a handle of the object and there are color properties for you to change. You may also need to change the Children object co...

5年弱 前 | 1

回答済み
Could anyone help me how to have the legend as in the desired manner for two y axis.
Change the last line x=1:10; y1=rand(1,10); y2=rand(1,10); y3=rand(1,10); y4=rand(1,10); figure(1) [hAX,hLine1,hLine2] ...

5年弱 前 | 0

| 採用済み

回答済み
Cutoff frequency in graph
For cheby filter, the cut-off frequency is the edge frequency at which the magnitude response of the filter is –Rp (passband rip...

5年弱 前 | 0

| 採用済み

回答済み
zplane z or z-1
It's z-plane. See the following example, where all poles are inside the unit circle. [b,a] = cheby2(8/2,20,[1 5]/8); zplane(b...

5年弱 前 | 1

| 採用済み

回答済み
how can i multiply two large arrays of different sizes?
sigma = 0 %can set sigma to any positive integer number but choosing 0 to simplify things for now w = (0:2*pi:10*...

5年弱 前 | 0

回答済み
Code Error Help Please
disp('2a-Part 1') f(-500,30,45,5,5); disp('2a-Part 2') f(-281,20,58,5,5); disp('2b-Part 1') f(-500,30,45,5,3.72); disp('2b...

5年弱 前 | 0

回答済み
How I can modify the decimal numbers in a table's column?
a = randn(5,1) str = sprintf('%.1f\n', a)

5年弱 前 | 1

| 採用済み

回答済み
Filter timetable by month
%T_Departures_Jan = T_Departures.Date_Time(timerange('01/01/2020', 'months'),:); T_Departures_Jan = T_Departures(month(T_Depart...

5年弱 前 | 0

| 採用済み

回答済み
I need to save previous adjacent position of object movement
RxPre = [0 0]; % initial position for xx=1:1:no_of_moves_in_x for yy=1:1:no_of_moves_in_y Rx = get_Rx_position(R...

5年弱 前 | 0

回答済み
Convert Time Given in Seconds to Minute, Seconds, Milliseconds
[h, m, s] = hms(duration([0 0 183.55])) % for sec and fractional sec si = floor(s) sf = s-si

5年弱 前 | 0

回答済み
Packing perfcurve results into a structure
% avoid using Struct (similar to keyword struct) p=struct('X', X_, 'Y', Y_, 'T', T_, 'AUC', AUC, 'OPTROCPT', OPTROCPT); % Al...

5年弱 前 | 0

| 採用済み

さらに読み込む