Community Profile

photo

Chunru


Last seen: Today Active since 2013

Matlab user since 1990

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • 3 Month Streak
  • Revival Level 1
  • Number Manipulation I Master
  • Indexing I Master
  • Commenter
  • Sequences And Series II Master
  • Knowledgeable Level 3
  • Speed Demon
  • Creator
  • Sequences And Series I Master
  • Cody Challenge Master

View badges

Content Feed

View by

Answered
Compare elements of an array with all elements in a matrix
P = randn(5,4) C = randn(1,4) lv = C > P

35 minutes ago | 1

Answered
Reading and Processing Many Text Files
foldername = 'C:***FILE LOCATION***'; % True folder name needed fileprefix = 'RESULTS_ONE_'; for i=1:N ...

41 minutes ago | 0

| accepted

Answered
I created a code which does filtering with convulution but it gives an error
The image has 3 channels and is a 3D array. You need to loop over the 3rd dimension as well. Use a different image below. A =...

3 hours ago | 0

| accepted

Answered
how to make a row all zeros in a matrix based on the two random number generated???
You can arrange A..F into a 3D matrix. X = randn(6,3, 6); idx = randperm(6, 2) for i=1:length(idx) X(idx(i), :, idx(i)) = ...

6 hours ago | 0

Answered
what is difference between C=+, C=A, c=unary(A)? All three provide same assignment of matrix A to C
C=+A; C = uplus(A) is an alternate way to execute +A, but is rarely used. It enables operator overloading for classes. So dep...

7 hours ago | 0

Answered
How can I Implement Runge Kutta 4 to plot the trajectory of a given point in a vector field?
As you have the intial point (0,0) and the intial speed (0,0), so the solution never progress to a different point. If you chan...

10 hours ago | 0

| accepted

Answered
How can I Implement Runge Kutta 4 to plot the trajectory of a given point in a vector field?
tspan = 0:.1:10; x0 = [0; 0]; [t,x] = ode23(@odefun,tspan,x0); subplot(211); plot(t, x); xlabel('t'); legend('x', 'y') subpl...

11 hours ago | 0

Answered
How can I Implement Runge Kutta 4 to plot the trajectory of a given point in a vector field?
Matlab has ode23 and ode45. https://blogs.mathworks.com/cleve/2014/05/26/ordinary-differential-equation-solvers-ode23-and-ode45...

11 hours ago | 0

Answered
Add String to Matlab Plot Annotation
pfSize = 2; dim = [.2 .5 .3 .3]; str = ['Pf Size:' num2str(pfSize)]; % use [] instead of () plot(rand(10,1)) annotation('te...

12 hours ago | 0

Answered
How can I fill a map drawn with plotm with red color?
plotm is for lines. you can use patchesm for area. load coastlines axesm sinusoid; framem patchesm(coastlat, coastlon, 'r')...

1 day ago | 1

| accepted

Answered
How do I have a loop for different data intervals.
A=rand(50,10); idx = [1 10; 11 22; 23 40]; for i=1:size(idx,1) Anow = A(idx(i,1):idx(i,2), :); T = Anow'*Anow; end ...

1 day ago | 0

| accepted

Answered
Sudden error "Unidentified function or variable"
[X1 Y1] = Elispe(1, sqrt(4/3), 0, 0, 0, 2*pi); % Z1 = zeros(1, length(X)); Z1 = zeros(1, length(X1)); %Z2 = ones(1, length(...

1 day ago | 0

Answered
How do you do freestyle drawing in MATLAB?
This gives you a schetch. You can fill up the rest using "text" and "plot" commands. x = 5:30; y = .2*(x-12).^2 -30; plot(x,...

1 day ago | 1

Answered
gaussian noise in infinite samples in real time matlab
t = 0; sigma = 1; % noise rms value while true x = cos(2*pi*0.01*t); % received data x = x + sigma * ra...

1 day ago | 0

Answered
How to create subplot with .png images in a loop
Try montage in image processing toolbox for display multiple images. a = imread('onion.png'); imageArray = repmat(a, [1 1 1 3*...

1 day ago | 0

Answered
How to adjust the legend of pie chart
Adjust the parameters if necessary. The plot in this web livescript is for illustration only. subplot(232); pie([51 2 45 2]);...

1 day ago | 0

| accepted

Answered
How to make line plot of 3 different colors?
% data x = [2:26 26:-1:-5]; y = [20:-1:-4 -5:-1:-36]; idx1 = y>=0; idx2 = y>=-10 & y<=0; idx3 = y<=-10; plot(x(idx1),...

2 days ago | 0

| accepted

Answered
roots finding using muller method
The Muller's method is supposed for finding the real solution. Your code is attempting to find the complex solution. I am wond...

2 days ago | 1

Answered
How can I trim these strings according to the underscores
str = "Novana_Model_B180_DK1_4284.0" str1 = strsplit(str, '_') join(str1(1:4), '')

2 days ago | 0

| accepted

Answered
Find a random position in a vector where the value is zero
% Generate some randome data with zeros n = 10; a = randn(1, n); k = randperm(n, round(n/2)); a(k) = 0; a % find zeros ...

2 days ago | 1

Answered
I am trying to get a numerical answer of following improper integral but not getting the correct value
Your integration interval [-11/7 11/7] include two points with infinity. Try the following: syms x; f =(exp(1/cos(x))); A=vp...

2 days ago | 0

Answered
How can perform "find" in loop?
VF = imread('Vf.tif'); Tnormal= imread('Tnormmsh.tif'); %[i,j]=size(VF); %length=i*j; len = numel(VF); % don't use length...

2 days ago | 0

| accepted

Answered
Improving the performance of matrix multiplication and division with nested for loops
Analyse your program to see if the matrix A is independent of which loop variables (it seems A is independent to some loop varia...

2 days ago | 0

Answered
Button to forward and rewind Videos
This can be accomplished by "timer class" (https://www.mathworks.com/help/matlab/ref/timer-class.html). On each timer event, you...

3 days ago | 0

Answered
I'm trying to convert a 1 dimension lat,lon,data to 2d data without interpolating (without griddata command). Is this possible?
Updated solution: T1 = readtable('chiranjit Das DAY_1.xlsx'); dg = 1; longrid = (-180:dg:180); latgrid = (-90:dg:90); z = n...

3 days ago | 0

| accepted

Answered
replacing a element of an array and show them in certain way.
a=[4 -6 0 2 5 0 -6] a(a>0) = 1; a

3 days ago | 0

Answered
butter is not working
clc; clear all; close all; m=1; Am=5; Fa=2000 ta=1/Fa; t=0:ta/999:6*ta; ym=Am*sin(2*pi*Fa*t); subplot(4,1,1); plot(t...

3 days ago | 0

| accepted

Answered
When a safe a csv file I can not see numbers instead symbols
remove the last line: save ('condition.csv', 'tabla'). You have already generate the .csv file in previous line.

3 days ago | 1

| accepted

Answered
draw line graphs connecting two points
% Fisrt specify the coordinates pstart = [ones(1,5); (1:5)] pend = [ones(1,5)+5; (1:5)+9] % plot the lines plot([pstar...

3 days ago | 0

Answered
pwelch info: equation involved and problem on the integral
From "doc pwelch" Welch’s Overlapped Segment Averaging Spectral Estimation The periodogram is not a consistent estimator of th...

3 days ago | 0

Load more