Community Profile # Chunru

Last seen: Today Active since 2013

Matlab user since 1990

#### Statistics

All
• • • • • • • • • • • • #### Content Feed

View by

How to blur some part of image without affecting rest of the part?
I = imread("peppers.png"); imshow(I) LEN = 31; THETA = 11; PSF = fspecial('motion', LEN, THETA); % Blur part of image I(1...

alrededor de 15 horas ago | 0

Is it possible to create a surface plot from scattered points?

alrededor de 15 horas ago | 0

Neural Network Activation function
net = feedforwardnet([10 20]); % 2 hidden, 1 output layers % specify the transfer function as you want % Usually, layer1...

alrededor de 16 horas ago | 0

| accepted

How to read images sequentially from a folder?
% create some files system('touch a.png'); system('touch c.txt'); pause(1) % make sure b is newer in datenum system('touch ...

alrededor de 18 horas ago | 0

how to make horizontal bar graph in matlab?
a = readtable('data.txt'); % Read the data a n = height(a); barh(1:10, a.Var2(1:10)); hold on barh(11:n, a.Var2(11:n)); h...

alrededor de 19 horas ago | 1

| accepted

How to make a unit energy signal?
%y=audioread('speech.wav'); y = rand(1000, 1); subplot(2,3,1); plot(y); xlabel('Samples'); ylabel('Magnitude'); title('Ori...

alrededor de 19 horas ago | 0

| accepted

How to plot these two plots in a single figure and using both y axis?
Use yyaxis syms r psi_list = [1, 0.1, 0.01, 0.001]; % example: 0.1, 0.01, 0.001 figure yyaxis left hold on for i = 1:numel...

alrededor de 19 horas ago | 0

| accepted

streamlining or sliming endless if-elseif of rem function, How?
N =3 % 3 varieties of foce calc, or/and initial forces m_tol = zeros(1,N) for bbm=1:N m_tol(1,bbm)=m_tol(1,bbm)+ 0.1*bbm ...

alrededor de 19 horas ago | 0

| accepted

How to separate characters in a cell array by commas
Wondering why you want that. But it can be done as follows: e = [3 0 -6]; n = length(e); e_str = cell(1,2*n-1); for i = 1:n...

alrededor de 23 horas ago | 0

| accepted

Vectorized nD diag loop
n = 400; m = 500; A = rand(4,n,m); B = zeros(4,4,n,m); % initialize to speed up tic for i = 1:n for j = 1:m ...

alrededor de 23 horas ago | 0

| accepted

Random Band-Limited White Noise Excitation
% Band-limited noise can be generated by passing a white Gaussian noise % through a band pass filter fs = 5; ns = round(700*...

1 día ago | 0

Computing the overlapping area of curves
scale = 1.5; x{1} = [0,4,6,10,15,20]*scale; y{1} = [18,17.5,13,12,8,10]; x{2} = [0,10.5,28]*scale; y{2}= [18.2,10.6,10.3];...

2 días ago | 0

| accepted

Change color of bar graphs?
y = [0.1064 0.1069 0.1084 0.1113 0 0.1130 0.1165 0.1189 0.1217]; b = barh(y); b.FaceColor = 'flat'; b.CData(1:4, :) = repmat(...

2 días ago | 2

| accepted

Perfect Square in Matlab
x = (1:20); mod(sqrt(x), 1) == 0

2 días ago | 0

How to calculate Fourier transform for exponential function without using FFT.
syms x f(x) = exp(-x.^2) y = fourier(f)

2 días ago | 0

Is there a way to handle the writing labels of axes coordinate (The writing is not in a straight line with respect to the axes. I would like to modify that.)?
[X, Y, Z] = peaks(40); figure surf(X, Y, Z) xlabel('This is XLabel'); ylabel('This is YLabel'); h =gca; % use the follow...

2 días ago | 0

The program cannot work
% [roll1,roll2] = dice(6) % The above is wrong in syntax as the function has only ONE return object % dice (as an array). %...

2 días ago | 1

How to make size of legend window on a figure window as small as we desire?????
openfig("fitness2snAll.fig"); figure openfig("fitness2snAll.fig"); h = legend % Try to adjust the position of the legend % ...

5 días ago | 0

| accepted

change tick values heat map
It seems that "heatmap" has no properties for changing display text. You can use imagesc instead: data = rand(4); imagesc(dat...

5 días ago | 1

| accepted

How to replace cell in a table with number?

6 días ago | 1

| accepted

Fitting 65k rows with 6 points takes too much time with for loop.
n = 65536; M_1 = randn(1, 6); M_2 = randn(n, 6); tic coefficients=zeros (n,2); for i=1:n coefficients(i,:) = polyfit...

6 días ago | 1

| accepted

How to make Network/nodal analysis and value distribution in MATLAB?
"graph" can be used for such problem. Node connections are: Node 1 - 2,3,8; Node 2 - 1,4,8 ; Node 3 - 1,5,8 ; Node 4 - ...

6 días ago | 1

change tick values heat map
cdata = rand(3,3); h = heatmap(cdata); h.XData = ["A", "B", "C"]; h.YData = ["A_1", "B_1", "C_1"];

6 días ago | 1

How to create table?
problem =["A", "A","A","A","B","B","B","B","C","C","C","C"]'; performance = ["D","E","F","G","D","E","F","G","D","E","F","G"]';...

6 días ago | 0

why 350*0.001 - 0.350 and 351*0.001 - 0.351 are different from zero
The floating-point numbers are represented by a sequence of binary bits in computer. For matlab, the default double type use 64...

7 días ago | 0

Divide the new images

8 días ago | 0

| accepted

Working on subsection of EMG data
The simplest way (but can be cumbersome) is to plot the data and manually mark the starting and ending point of each section of ...

8 días ago | 0

How to extract the right struct from the cell array of structs based on condition?
load part.mat whos % MATLAB-ish way idx = cellfun(@(x) isfield(x, 'property') && x.property == "Mass %", values); searchedIt...

8 días ago | 0

| accepted