回答済み
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

さらに読み込む