Community Profile

photo

Chunru


Last seen: 2 days ago Active since 2013

Matlab user since 1990

Statistics

All
  • Treasure Hunt Participant
  • MATLAB Central Treasure Hunt Finisher
  • Guiding Light
  • Revival Level 2
  • Number Manipulation I Master
  • Indexing I Master
  • 6 Month Streak
  • Knowledgeable Level 4
  • Commenter
  • Sequences And Series II Master
  • Speed Demon
  • Creator

View badges

Content Feed

View by

Answered
Plot time-series data of various column
% Read in data %k = xlsread('ACTUAL DATA_WIND SPEED.csv'); k = readmatrix('plot_try1.csv'); k(1, :) = []; % remove the heade...

1 day ago | 0

| accepted

Answered
Function won't display output in command window
You have to save the function as "funfactorial.m" first (not Untitled.m).

1 day ago | 0

| accepted

Answered
matrix error, long answer
Becasue the range of data is too big, the displayed result using the default format may make the smaller value to be 0. Run the...

1 day ago | 0

Answered
I cannot figure out how to get my data to plot on a simple line graph.
data = readmatrix('Copy of Pop Up.csv'); x = data(:, 1); y = data(:, 3); plot(x, y); % plot('Year','Num_corals') ...

1 day ago | 0

Answered
Can my x-axis have varying scales for certain ranges of values?
Yes. You can change the tick locations: t = 1:200; x = sinc(2*pi*.125*t); plot(t, x); set(gca, 'XTick', [0:20:60 70:10:100 ...

2 days ago | 0

Answered
Why won't my plot line show in plot?
W_dot_net = 3; % a constant n_c = linspace(0.6,0.8,10); % The following can be vectorized and simplified. But the loop f...

2 days ago | 0

Answered
how do I make script that plots values from workspace dividing into the case
x = randn(101, 1); y = randn(101, 1); idx = x.*y > 0; % same signs plot(x(~idx), y(~idx), 'ro'); grid on

2 days ago | 0

| accepted

Answered
Double Integration error using /
Keep in mind that the function should be defined for vector arguments x and y. Therefore some * and / should be changed to .* a...

3 days ago | 1

| accepted

Answered
Can one install two matlab versions in one machine?
Yes. As long as you have space, you can install new version along with old versions.

3 days ago | 0

Answered
Plotting combined and separated graphs for nested for loops
for n = 2:10 figure; hold on for j = 1:10 plot(x,y(:,n,j)); end hold off end

3 days ago | 0

| accepted

Answered
Generate repeatable random integers within a fixed range
a = randi([4 11], 4, 1)

3 days ago | 0

Answered
finding the values of X for a given Y in an equation
syms x y solve(x^4+x^2 == 3)

3 days ago | 0

| accepted

Answered
How to create a nested cell file?
DATA(5).A.B.C=rand(12,31); DATA(1) DATA(5)

3 days ago | 0

Answered
Make a logical array into a single logical column, if any of the array rows contain a 1
a = [0 0 0; 1 0 0; 0 1 0; 0 0 0] b = any(a==1, 2)

3 days ago | 1

| accepted

Answered
How to find a y value for a given x in a plot?
x1 = 25; y1 = interp1(t1, p1, x1);

3 days ago | 0

| accepted

Answered
Question regarding arranging matrix values
% a 22*1 matrix with end values zeros. x = rand(22, 1); x(end-5:end)=0; x % the last two zeros to occupy the first two row...

4 days ago | 0

Answered
Color scale of scatter plot?
x = randn(100, 1); y = randn(100, 1); cmap = parula(512); cmap = cmap(1:360, :); % dark blue to green (360 colors) pos_...

4 days ago | 0

Answered
How to get a line plot
x=[25 45]; y=[200 200] plot(x,y,Color='black') axis([20 50 100 400])

5 days ago | 0

| accepted

Answered
not displaying eval in command window
Try this: for i =1 : length (signal_names) ImportedSignals = genvarname(cell2mat(signal_names(i)), who); eval([Import...

5 days ago | 0

| accepted

Answered
How can I find the intersection points between two curves and area between these curves?
% These are the Input parameters used w = 60; h = 350; T0 = 60; rho = 600; T= 3.175; N...

5 days ago | 0

| accepted

Answered
Calculate mahalanobis distance of matrix for each row
A = [110 -100 0; 100 -100 0; 10 0 0; 0 10 0; 0 -10 20; 0 -10 10; 0 0 10;-10 -10 -10; -10 0 0]; mean_row = mean(A,1); whos d =...

5 days ago | 0

| accepted

Answered
how to add two binary digits of 8bit size?
a = '01001011'; b = '00100011'; c = '00000000'; % Cosider a carry bit carry = 0; % loop through from last bit to first ...

5 days ago | 0

| accepted

Answered
select only one value every four (or different numbers) in an array
a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] b = a(4:4:16)

5 days ago | 1

| accepted

Answered
How can I arrange a vector in ascending order
D = [3 6 7 2 -4 7 3 2 ] D1 = sort(D)

5 days ago | 0

| accepted

Answered
Calculate covariance matrix for simple example
format longg temp = [1 2 4 2 5; 100 300 200 600 100; 10 15 20 10 30]; res = cov(temp.')

5 days ago | 0

| accepted

Answered
How to start two plots with different origins.
p1 = [0 0]; % inital position for object 1 p2 = [2000 0]; v1 = [150 20]; % initial velocity for object 1 v2 = [-80 30...

5 days ago | 1

| accepted

Answered
pdf file direct download
url = "https://www.mathworks.com/help/pdf_doc/matlab/learn_matlab.pdf"; tic urlwrite (url, 'learn_matlab.pdf'); toc dir

5 days ago | 0

Answered
How can i use string values saved in a cell array as variable names in a for loop.
You can put the result in a struct with field names corresponding to your Dist_type load Test_Data.mat Dist_type = {'Kernel', ...

5 days ago | 0

| accepted

Answered
To usa counties and state mape and shade with different color
warning off states = shaperead( 'usastatehi.shp'); % MATALB comes with usa states map .shp file You can download the county l...

5 days ago | 0

| accepted

Answered
Generating Geometry Patterns at Scale
What does flattenong the plot of the red polygon mean? xCenter = 10; yCenter = 10; % Modification to the FAQ is the next two ...

5 days ago | 0

Load more