Community Profile # Chunru

Last seen: Today Active since 2013

Matlab user since 1990

#### Statistics

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

View by

Convert a function into a matrix
Parameters= {'R0','R1','C1','Qr','bo','b1','SOC','Vrc','Voc'}; R0=0.000605797; Qr=147964.8608; R1=0.000856205; C1=0.04982323...

2 días ago | 0

Sorting/Grouping based on date for all years
x = readtable("Example.xlsx"); % head(x) x1 = x(x.Var1>=datetime(2004, 09, 27) & x.Var1<=datetime(2004, 10, 27), :); summar...

2 días ago | 0

How to create a 3D surface plot from scatter3?
test=load('test.txt'); x = test(:,1); y = test(:,2); z = test(:,3); s=scatter3(x,y,z); view(3); figure dt = delaunayTri...

2 días ago | 0

How do I change axis label orientation
[X, Y] = meshgrid(1:.2:10, 1:.2:20); Z = sin(X) + cos(Y); figure surf(X, Y, Z) xlabel('XLabel'); ylabel('YLabel'); zlabel(...

2 días ago | 0

| accepted

how to remove values below 0.1?
a = 0.4*rand(100,1); % generate some data a(a<0.1) = nan

3 días ago | 0

predicting crossproduct and magnitude of a vector
Multiple-layer feedforward network is a universal approximater (with some nonlinear transfer functions). So you can predict the...

3 días ago | 1

| accepted

table select rows with string/value of two colums
data ={ 704306.281000000 5364346.78000000 440.678000000000 113 'R' 'AX_UnlandVegetationsloseFlaeche' 0 0 0 0 0 0 70...

3 días ago | 0

Hello, I did a for loop but my friend told me it is not the correct matlab syntax. Can anyone help me the for loop is in the description below:
It looks like you want to find the local minima xa = randn(30, 1); Lm = nan(size(xa)); for i=2:length(xa)-1 if xa(i-1)>x...

9 días ago | 0

Storing matrices in cells
for i=1:20 %psudoinverse pH_matrix=pinv(H_matrix); % H_matrix: 1X20 % You can use cell array to store the result ...

9 días ago | 0

| accepted

change the hyphen (-) into minus sign (−, “U+2212”)
set(groot,'defaultAxesTickLabelInterpreter','latex'); plot(randi([-60 60], [20, 1])) xticks(-60:20:60) yticklabels(strrep(yt...

9 días ago | 0

| accepted

Sign minus, not hyphen
c1 = '−'; % (UTF-16: 2212), not -. c2 = '-'; s1 = "both − and -" s2 = strrep(s1, c1, c2) contains(s1, c1) contains(s2, c1...

11 días ago | 0

A=[1,2,3; 4,5,6; 7,8,9] B=[1,2,3] C= [1,4,6;4,10,18;7,16,27] % Use array (not matrix) multiplication (with auto dimension ex...

11 días ago | 0

Storage many same dimension matrixes to one matrix
Try to avoid eval. Use N-D array or cell array instead. n=10; %100000 x = zeros(4, 4, n); for i = 1:n x(:,:,i) = ifft...

11 días ago | 0

| accepted

The definition of layers in general literature is different from that of MATLAB layers. For example, the usual "convolution" la...

11 días ago | 0

| accepted

concatenate matrix with zeros function
The code "TxRxPairs = zeros(ants_pairs.Length,2)" is correct. It has the function name "zeros" followed by the arguments inside...

11 días ago | 0

Load multiple files to MATLAB without changing name manually
% list the files to be processed fn = dir("signal*.csv"); for ifile=1:length(fn) current_fn = fn(ifile).name; % [fil...

13 días ago | 0

| accepted

How can I find rank of matrix?
% Get the coefficient matrix of the system A = [ 7 6 9 2 7 1 3 2 2 1 5 5 6 4 ...

13 días ago | 1

Need help with Contour plot
x = [1 0.975744 0.294546 0.192422 0.155833 2 0.956922 0.172609 0.112765 0.089115 3 0.950648 0.131963 0....

13 días ago | 0

| accepted

Newton's method
https://en.wikipedia.org/wiki/Newton%27s_method R = 5; % input f=@(x) x.^3 - R; % f(x) = 0 df=@(x) 3*x.^2; ...

13 días ago | 0

| accepted

OnRamp Example Question/Troubleshooting
You should type "y = [7 9]" only. The second and third lines is the output of the command when you run it and they are not matl...

17 días ago | 0

Plotting of a cell array
a = rand(12,10)+4; b = rand( 5, 12)+3; c = rand( 4, 9)+2; d = rand( 10, 15)+1; M = {a,b,c,d}; % Cell Array p = 3; % for ho...

23 días ago | 0

How can I skip empty cells when averaging during a function?
load explained_balls whos for i = 1:length(explained_balls) %explained_balls{i} if isempty(explained_balls{i}) ...

23 días ago | 0

Index in position 1 exceeds array bounds.
It seems that your code works well. Can you show how the error occurs? x = randn(4, 5) F_ransac(x) function [epsilon, p, tol...

23 días ago | 0

plot the abs of fft. fb=1000; %frecuency of the square signal Tb=1/fb; fs = 999/Tb; %t=0:Tb/999:7*Tb; %time vector t=0:1/fs...

23 días ago | 1

| accepted

Hex to Num / Hex Cell Array
x ={'3A', 'F1', 'CF', '4C'} y = cellfun(@hex2dec, x)

23 días ago | 0

| accepted

How to write the string after a spesific point in cell array?
s = 'ASDASDDSA 123213213 ASDADASDA 18128, ASDSAD [ 123 123 123 12 3 123123 123 123]' t = regexp(s, '\[[\d\s]*\]', 'match')

24 días ago | 0

Unable to add coastlines to SST plot

24 días ago | 0

| accepted

How to apply STFT and convert it into Time frequency Image In MATLAB
load frame8PSK001 whos nfft=128; % doc spectrogram for more details spectrogram(frame, hamming(nfft), nfft/2, nfft, 'centere...

24 días ago | 0