已回答
How can to compute the following case?
load(websave("D.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1436693/D.mat")); for i=1:size(D, 1) ...

1 year 前 | 0

已回答
how to smoothen this calor bar image
n = 17; x =0:n-1; y=0:n-1; a = randn(n, n); subplot(121); imagesc(x, y, a); xlim([0 n-1]); ylim([0 n-1]); subplot(122); ...

1 year 前 | 0

已回答
fsolve no solution found results
doc fsolve for more details. [x, fval, exitflag, output] = fsolve() % check out exitflag and output

1 year 前 | 1

已回答
Is it possible to go down a row and still run the code?
Use ... at the end of line for line continuation analysisdata(1:17,1)={'Image name', 'Cell mask number', ... 'Total masked...

1 year 前 | 1

已回答
create empty row inside a vector
load(websave("value_GS_test.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1436593/value_GS_test.mat")); ...

1 year 前 | 0

| 已接受

已回答
How to interpolate to fill zeros in two-dimensional data
load(websave("power.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1436568/power.mat")) whos L2 = 200;...

1 year 前 | 0

已回答
How do I store x-y coordinate values in a 2 Dimension array (n x n) with its x-y position ?
xy = [27 104; 35 100; 47 102; 25 110; 35 114; 47 109; 50 123]; A = zeros(7, 7); ...

1 year 前 | 0

| 已接受

已回答
To use multiple xtick methods in MATLAB plot
x1 = [1 2 3 4 5]; x2 = [0.1 0.2 0.3 0.4 0.5]; x3 = [10 20 30 40 50]; y = rand(3, 5); % make data different %% Use mu...

1 year 前 | 2

| 已接受

已回答
How to iterate and access over map key values
mp = dictionary(["a1", "a2", "a3"], {1, [2 3], "str"}) k = keys(mp); v = values(mp) for i = 1:length(v) disp(v(i)); end...

1 year 前 | 0

已回答
How to find intersections in contour plot?
rho = 4420; %kg/m^3 Cp = 550; %J/kg?K T0 = 303.15; %K A = 0.5; %[Absorbtivity] k = ...

1 year 前 | 2

| 已接受

已回答
acoustic emission cumulative energy
% signal amp = sqrt(2); f0 = 100; fs = 1000; % simulated signal (replace it with audio file) x = amp*sin(2*pi*f0*(0:1/fs:5)...

1 year 前 | 0

已回答
Calculate and plot a cdf or pdf functions for 3D matrices?
% Sample data with normal distribution nlat=2; nlon=3; nyear=150; A=randn(nlat, nlon, nyear); edges = (-3:.3:3); x = (edges(...

1 year 前 | 0

已回答
How to plot a surface not sampled on a gid/mesh
% generate a surface X = rand([1000 1])*2*pi; Y = rand([1000 1])*2*pi; Z = sin(X) + cos(Y); % trianglation tri = delauna...

1 year 前 | 0

| 已接受

已回答
How to make a structure with numerous(>200) fields with loop?
n= 5; Data = randi([1 10], [5 1]) for i = 1:n S.("Pt_"+i) = Data(i); end S

1 year 前 | 1

| 已接受

已回答
Trouble with Implementing Moving Average Filter in MATLAB
%Input data inputData = [1, 2, 3, 4, 5, 6, 7, 8, 9]; windowSize = 3; % use matlab function filteredData = movmean(input...

1 year 前 | 0

已回答
Finding Indices of Zeroes Following Non-Zero Elements in MATLAB
x = [0,0,0,0,0,0,1,3,5,2,4,6,7,8,3,0,0,0,0,4,1,10,22,11,22,44,44,12,0,0,0,0]; x1 = x>0 % clipped x i1 = find(diff(x1)>0) i2 ...

1 year 前 | 0

已回答
How to read all variables in netcdf file
fn = "abc.nc" ni = ncinfo(fn); for i=1:length(ni.Variables) vn = ni.Variables(i).Name; x.(vn) = ncread(fn, vn); %...

1 year 前 | 0

| 已接受

已回答
Matlab矩阵处理。
data = [1 2 2;1 0 2;2 1 4;2 3 6;2 5 6;3 2 1;3 6 5;3 7 8;3 6 4] data(data(:, 1)<3, :) =[]

1 year 前 | 0

已回答
error in line1and 4
Those are comments which shoud start with % % Calculate the response function using the equation of motion: omega_n = sqrt(k /...

1 year 前 | 0

已回答
'poly1' unrecognized
x = (0:0.2:5)'; y = 2*exp(-.2*x) + 0.5 * randn(size(x)); f = fit(x, y, 'poly1'); % check the path of fit which fit plot(f...

1 year 前 | 0

已回答
Creating a time series signal from a known PSD
f = [0,0.0732422000000000,0.146484000000000,0.219727000000000,0.292969000000000,0.366211000000000,0.439453000000000,0.5126950000...

1 year 前 | 0

已回答
Need values for the Astroid generated in MATLAB
syms x(t) y(t) z(t) x(t) = sin(t); y(t) = cos(t); z(t) = cos(2*t); % specify the t interval fplot3(x,y,z, [-pi pi])

1 year 前 | 0

已回答
How to format notation to use "... x 10^-5..." instead of "...e..." in this figure
websave("Fig.fig", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1380189/Fig.fig") h = openfig("Fig.fig", "vi...

1 year 前 | 1

| 已接受

已回答
Dot indexing is not supported for variables of this type.
% avoid use variable such as o and O x = rand(256, 236); y = fft2(x,256,256); % assume that you are computing the power p =...

1 year 前 | 0

已回答
Error: Z must be a matrix, not a scalar or vector and error in solution (line 12): surf(x,y,z);
Change the value of b: %Set the Domain of both x and y by setting the lower limit a = 0 %Enter the l...

1 year 前 | 0

已回答
Related to Graph ?
sr = [1,2,2,2,3,3,3,4,5]; ta = [2,3,6,8,6,4,7,6,6]; % Use graph weight for SNR snr = randn(size(sr)); % gaussian dist...

1 year 前 | 0

已回答
Can't see quiver plot
figure, hold on; axis([0 100 0 100]), axis square, box on; xlabel('x'), ylabel('y'); obslist = [60 60 15; 20 40 7...

1 year 前 | 0

已回答
help draw curved line between two points
Pos=[ 10009.6827000000 49968.6391000000 618.340200000000 10019.7800000000 49979.0046000000 622.162400000000 10027.3819000...

1 year 前 | 0

| 已接受

已回答
my arrow is not going directly underneath my subplot. please help to adjust position its driving me not happy tried for 4 hours
% Plot the circle subplot(3, 4, 3); theta = linspace(0, 2*pi, 100); centerp = [0 0]; radiusp=1; x = centerp(1) + radiusp*cos...

1 year 前 | 1

| 已接受

加载更多