Réponse apportée
automatically scale display range to eliminate outliers
y = randn(50, 50); y (20, 20) = 1e8; % outlier subplot(121) imagesc(y); % outlier removed colorbar subplot(122) imagesc...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
Edit legend description and make a dot in on of the character
Try to modify the following: % generate some data data = (1:10)' + randi([3 20], [1 4]); plot(data) legend(["1 $s=u$" "2 $s=...

environ 4 ans il y a | 0

Réponse apportée
plotting nonlinear equation along real and imaginary axis
Try the following: Re-arrange the equation so that it is polynomial of complex variable z with coefficients being function of r...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
sum of dirac delta function
syms x t y(x) = dirac(x-1); for i=4:3:200 y(x) = y(x) + dirac(x-i); end z = y(x)* exp(-4*(t-x)); y z

environ 4 ans il y a | 0

Réponse apportée
how to divide the Dataset into xtrain xtest ytrain ytest
% doc cvpartition data = randn(2310, 25); %cv = cvpartition(2310, 'Holdout', 0.3); %idxTrain = training(cv); %idxTest = te...

environ 4 ans il y a | 1

Réponse apportée
need to skip iterations in a for loop
L=zeros(1024,1024); % for n=(2:1022:3) % L(1024,n)=1 % end % Set the last row (first end), column 2 to last column wi...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How to calculate the width that contains 60% of the total area of peaks?
load position load Intensity whos plot(x2, Int); hold on % find the max [maxI, idx] = max(Int); maxX = x2(idx) n = length...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
I need help with plotting
syms t Zc=300; R=100; s=100; v=300/(1*10^-6) tpulssi=s/v k=-1000/tpulssi p=(R-Zc)/(R+Zc) s2=25 tpr=s2/v %heijastuva t...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
Assigning same color for same value at different plots
x{1}=[0.1 0.4 0.6 0.8]; y{1}=[0.2 0.3 0.7 0.9]; name{1}=["A" "B" "C" "A"]; x{2}=[0.1 0.2 0.4 0.6 0.5 0.8]; y{2}=[0.2 0.5 ...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How do I plot a graph for ϴ for a given range of independent variables?
Assume that r, theta, phi are 3d spherical coordinates. theta is elevation and phi is azimuth. The following is the code to pl...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
I want to create printouts with exact sizes (1=1")
g = figure; g.Units = 'inches'; g.Position = [1 2 3 3]; % 3 by 3 inches plot(rand(10,1)); saveas('test.pdf'); % You ca...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Trying to understand the single-sided FFT
Assume X(k) = FFT(x(n)). Then one estimate of Power Spectrum Density (PSD) of x(n) can be given as P(k) = X(k)^2 / N for genera...

environ 4 ans il y a | 0

Réponse apportée
Extract data from a table corresponding to specific time
Save your data into a text file: data.txt x = readtable("data.txt"); a= strrep(string(x.Var1) + " " + string(x.Var2), "'", ...

environ 4 ans il y a | 0

Réponse apportée
How to plot averaged ROC curve?
% Create sample data numPoints = 50; nCurves = 10; x = sort(rand(numPoints, nCurves)); y = (sort(rand(numPoints, nCurves)))....

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Removing negative values of 3d data
x = load("ggv.mat"); GGV = x.GGV; figure surf(GGV(:,:,2), GGV(:,:,3), GGV(:,:,1), 'EdgeColor', 'none'); xlabel('x'); ylabel(...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How do I crop out a certain part within a matrix of numbers?
Are you looking for this? A = [1 2 3 4 5 ; 4 9 6 3 9; 2 5 4 1 3 ] B = A(2:3, 3:5) %% More general X = [1 2 ...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
How Can I Resolve Plotting Error?
clc; %clear the console clear all; %clear all the variables %%defitions temp=2000; x_2=0.01:0.01:0.99; % Get th...

environ 4 ans il y a | 0

Réponse apportée
Removing negative values of 3d data
% Your data data = randn(357, 177, 3); % limit to 0 data(:, :, 3) = max(data(:, :, 3), 0); % to limit the surface up to 0...

environ 4 ans il y a | 0

Réponse apportée
How to show the accuracy on a confusion matrix
You nee to add column and row summaries. Check out the following example from doc. load fisheriris X = meas; Y = species; ...

environ 4 ans il y a | 0

Réponse apportée
How to graph 4 lines on one plot using a function?
% function th=angle(th) th = [10 30 60 95]; r = [0 1]'; % two points for each angle % i=1:length(th); x=r*cosd(th); y=...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
plot the region represented by 'ABS (x) + abs (y)≤1'
If you don't want to derive the boundary of the surface, you can do the following: [xx, yy] = meshgrid(linspace(-2, 2), linspac...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How can I correct if else to not get this error?
The code has some logical errors (with correction below). For the error "Execution of script MATLABex as a function is not su...

environ 4 ans il y a | 0

Réponse apportée
Removing drift from EMG signal
%% detrend % Remove polynomial trend t = 0:20; x = 3*sin(t) + t; y = detrend(x); plot(t,x,t,y,t,x-y,':k') legend('Input ...

environ 4 ans il y a | 0

Réponse apportée
3 level nested structs leading to out of memory
It takes ~472MB memory as shown below. a = struct('nestedLevelOne', ... repmat({struct('nestedLevelTwo',repmat({zeros(1,10...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
finding the slope of each segement in a fitted curve
T = readtable('https://jp.mathworks.com/matlabcentral/answers/uploaded_files/963595/t1.txt'); idx = isnan(T.NE); T(idx, :) = [...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
How to split data matrix conditionally?
You will not get an matrix for the output since the number of entries satisfying the condition for each column will be different...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Different color for each line
% generate some random data x = rand(10, 20); % Generate different colors cmap = jet(20); % Change the colororder coloro...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Best way to export image using Matlab for Latex and Powerpoint - SVG?
For LaTeX, you have the following options in addition to svg: eps file pdf file matlab2tikz/matlab2​tikz (https://www.mathwor...

environ 4 ans il y a | 0

Réponse apportée
Plot with two different y axis (text-data)
t = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/961730/Cartel1.xlsx'); head(t) plot(t{1, 2:end}'...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
Is there a way to fine-tune the logarithmic scale of an axis?
semilogy(1:5000); grid on % if you want more control h = gca; h.YTick = [1 100 1000 10000]; % skip one tick

environ 4 ans il y a | 0

| A accepté

Charger plus