Beantwortet
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], [...

fast 5 Jahre vor | 0

Beantwortet
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...

fast 5 Jahre vor | 2

Beantwortet
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, ...

fast 5 Jahre vor | 0

Beantwortet
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...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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 ...

fast 5 Jahre vor | 0

Beantwortet
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')

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 0

Beantwortet
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...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 0

Beantwortet
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...

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

Beantwortet
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...

fast 5 Jahre vor | 0

Beantwortet
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) +... ...

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

Beantwortet
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...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 1

Beantwortet
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] ...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 1

| akzeptiert

Beantwortet
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*...

fast 5 Jahre vor | 0

Beantwortet
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...

fast 5 Jahre vor | 0

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

fast 5 Jahre vor | 1

| akzeptiert

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

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 5 Jahre vor | 0

Beantwortet
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

fast 5 Jahre vor | 0

Beantwortet
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...

fast 5 Jahre vor | 0

| akzeptiert

Mehr laden