답변 있음
how to solve extra text error when reading json files?
% I had to change the extension to upload the file, so here I change it back: movefile('test1.txt','test1.json') Try this: tx...

거의 3년 전 | 1

| 수락됨

답변 있음
Delete rows from a table below a certain threshold
% Example Time, Data and T: Time = (1:10).'; Data = rand(10,1); T = 0.5; % Your code, modified: Table = cat(2,Time,Data) ...

거의 3년 전 | 0

| 수락됨

답변 있음
scatterplot for matrix output
M = 2*rand(40,46)-1; % random residuals -1 to 1 ages = 50:95; years = 1980:2019; [A,Y] = meshgrid(ages,years); idx = M >...

거의 3년 전 | 0

| 수락됨

답변 있음
Export variables from excel based on a defined column category and time
Something like this would work, if the exact times you're looking for (i.e., every 1 minute starting at an event, until the next...

거의 3년 전 | 0

| 수락됨

답변 있음
How can I plot this kind of graph with variable sample bins?
Maybe it is a histogram2 plot with 'DisplayStyle' 'tile'. histogram2(randn(1e6,1),randn(1e6,1),'DisplayStyle','tile') colorbar...

거의 3년 전 | 1

| 수락됨

답변 있음
how can I change the size and font to Times New Roman of the xtickslabel that appear in the graphic? Thank you in advan
ax.XAxis.FontSize = 16; % or whatever ax.XAxis.FontName = 'Times New Roman';

거의 3년 전 | 1

| 수락됨

답변 있음
x-axis values repeat themselves when I use tiledloyout for plots
The reason the xticklabels repeat is that there are fewer labels than there are ticks. Now, you may say, "How can that be? I set...

거의 3년 전 | 0

| 수락됨

답변 있음
Separate numbers present within a cell on multiple rows
Take advantage of the second output of maxk, which is a vector of indices of the maxk values. CountArray = importdata("CountArr...

거의 3년 전 | 0

| 수락됨

답변 있음
How to draw multiple lines (plots) using semilogy() at once?
It is not necessary to resort to using eval to evaluate a list of arguments stored as a string. You can store the arguments in ...

거의 3년 전 | 0

답변 있음
Code for file processing
Here's one way to do it, with intermediate output along the way so you can follow along. % read the file str = readlines('stat...

거의 3년 전 | 1

| 수락됨

답변 있음
how set width column in table app designer
x = [{90} repmat({30},1,size(app.UITableFilteredTable.Data,2)-1)]; app.UITableFilteredTable.ColumnWidth = x;

거의 3년 전 | 0

| 수락됨

답변 있음
Select data from excel sheet from specific row to specific row
Here is one way to read that file and break its contents up by cykle: C = readcell('prow_KL_1.xlsx'); idx = find(cellfun(@is...

거의 3년 전 | 0

| 수락됨

답변 있음
How to change the color of the connections in plot to only one color?
To set the node labels, you can specify them with the 'Labels' input argument to circularGraph. To set the colormap, you can sp...

거의 3년 전 | 0

| 수락됨

답변 있음
How do I find the rows in one table that have certain string?
"I want to identify the rows in column 17 that contain 'Inactive'" % get the indicies of rows with "Inactive" STATUS: inactive...

거의 3년 전 | 0

| 수락됨

답변 있음
Help in labelling Heatmap
To label the x- and y-axis, you can use xticklabels and yicklabels in this case. To highlight the diagonal elements, you can cr...

거의 3년 전 | 0

| 수락됨

답변 있음
Title inside figure plot
Something like this? % a figure, red in color so it can be seen against the white background here: figure('Color','r') % so...

거의 3년 전 | 1

| 수락됨

답변 있음
How can i save an array in a txt file, with every number of the array in a different row?
Something like this? % a matrix M = magic(4) % write to file, using (:) to convert to column vector first writematrix(M(:),'...

거의 3년 전 | 0

답변 있음
How to change the name of a table and its headings?
The name of the table has to be a valid MATLAB variable name ("Time_duration_vehicle_speed" is OK; "Time duration vehicle speed"...

거의 3년 전 | 0

답변 있음
How to remove a single point from meshgrid?
First, notice that zero doesn't appear in x: x = linspace(-3,10); zero_x_idx = find(x == 0); zero_x_idx But if you used diff...

거의 3년 전 | 1

답변 있음
How to get rid of this nested for cycles?
I assume that you cannot change Q, and you need to calculate rev from Q. % simulating similar inputs: K = 3; H = 250; N = 50...

거의 3년 전 | 1

답변 있음
Grading multiple different but correct answers in MATLAB Grader
You can use ismember or ismembertol to check that the answer is among a set of acceptable answers.

거의 3년 전 | 0

답변 있음
Delete only one smithplot line
Note that the output from smithplot() is a Smith chart object, not a line object as is output from plot, so it makes sense that ...

거의 3년 전 | 0

| 수락됨

답변 있음
Use of Interp to Interpret Data from a Table
Use interp1 instead of interp.

거의 3년 전 | 1

답변 있음
Plotting two non linear equations in same graph
Use element-wise operations (.^, ./, .*) t= linspace(0,1); y= linspace(0.5,1); [X, Y] = meshgrid(t, y); f1= @(t,y)(y - ((t.^...

거의 3년 전 | 1

답변 있음
Location of legend on tiledlayout does not match with the plot
% some plots t = tiledlayout(3,3); for i = 1:9 nexttile(t) plot(rand(10,3)); end % make the legend leg = legend...

거의 3년 전 | 0

| 수락됨

답변 있음
How to put matrices defined earlier in "for loop" later
Instead of making 6 separate variables, you can put those 6 matrices in a single variable that you can index, e.g., a 3D array o...

거의 3년 전 | 1

답변 있음
Is it possible to programmatically suppress figure roll-over menu (zoom, rotate, etc)?
From Axes Properties documentation: Data exploration toolbar, which is an AxesToolbar object. The toolbar appears at the top-ri...

거의 3년 전 | 0

답변 있음
Error plotting distribution on top of pcolor
geoshow(sid.Longitude, sid.Latitude,sid.No_Individuals 'DisplayType', 'Point', 'Marker', 'o', 'Color', 'red'); % ...

거의 3년 전 | 0

| 수락됨

답변 있음
average of matrix cells
Here are a couple of guesses: 1. M = ones(7); M(2:end-1,2:end-1) = 2; M(3:end-2,3:end-2) = 3; M(4,4) = 4 cells1avg = mean(...

거의 3년 전 | 1

| 수락됨

답변 있음
How to add rows containing zeros to a matrix
Here's one way: % a 2x101 matrix a = rand(2,101) % append 4 rows of zeros a = [a; zeros(4,size(a,2))]

거의 3년 전 | 2

더 보기