Risposto
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) ...

circa un anno fa | 0

Risposto
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); ...

circa un anno fa | 0

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

circa un anno fa | 1

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

circa un anno fa | 1

Risposto
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")); ...

circa un anno fa | 0

| accettato

Risposto
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;...

circa un anno fa | 0

Risposto
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); ...

circa un anno fa | 0

| accettato

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

circa un anno fa | 2

| accettato

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

circa un anno fa | 0

Risposto
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 = ...

circa un anno fa | 2

| accettato

Risposto
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)...

circa un anno fa | 0

Risposto
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(...

circa un anno fa | 0

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

circa un anno fa | 0

| accettato

Risposto
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

circa un anno fa | 1

| accettato

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

circa un anno fa | 0

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

circa un anno fa | 0

Risposto
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); %...

circa un anno fa | 0

| accettato

Risposto
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, :) =[]

circa un anno fa | 0

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

circa un anno fa | 0

Risposto
'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...

circa un anno fa | 0

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

circa un anno fa | 0

Risposto
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])

circa un anno fa | 0

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

circa un anno fa | 1

| accettato

Risposto
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 =...

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 0

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

circa un anno fa | 0

| accettato

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

circa un anno fa | 1

| accettato

Carica altro