Answered
How to extract maximum monthly data from a table based on month and years
T_original = readtable('Chakaliya.csv') T = T_original; T.(1) = T.(1)+years(1900+100*(year(T.(1))<=10)); % 91->1991, ..., 0->2...

2 years ago | 0

| accepted

Answered
Plotting perpendicular lines but they are not perpendicular.
The lines don't appear perpendicular because the data aspect ratio of the axes (i.e., the number of pixels on the screen one uni...

2 years ago | 2

Answered
how toggle this warning using unstack function
load('matlab_T1.mat') T1 Option 1: Toggling the warning: warning("off","MATLAB:table:ModifiedVarnamesUnstack") Result = unst...

2 years ago | 0

| accepted

Answered
I don't know what's the problem, can somebody help me, i don't know the exact length of myspeech/myrecord since it varies on how fast i read
Maybe you meant to name the variable returned by getaudiodata "mySpeech" instead of "y": % y = getaudiodata(recObj); mySpeech ...

2 years ago | 1

| accepted

Answered
Read Excel and write the output in same sheet in three columns
@MINATI PATRA: Check and see if this seems right: filename = 'sample.xlsx'; % path to your file, e.g., 'D:\PK79\Book1.xlsx' ...

2 years ago | 0

| accepted

Answered
How to convert MIDI file into audio file and preserve tempo?
zF = load('Click Track TEST.mat'); % LOAD MIDI FILE INFO cMALL = zF.cZ; disp(cMALL) Assuming 120 BPM (i.e., 1 beat every 0.5 ...

2 years ago | 0

Answered
Read Excel and write output
filename = 'Book1.xlsx'; % path to your file, e.g., 'D:\PK79\Book1.xlsx' % read the file to a table: T = readtable(filename...

2 years ago | 0

| accepted

Answered
how to solve this problem?
Q_p = [1.05012447435464, 25.3238658780576, 26.3238658780576, 55.0712183513003, 6.7116155293271] idx = (Q_p >= 50) & (Q_p < 250)...

2 years ago | 0

Answered
Plot a direction field whose vectors have the same size
The vectors do have the same size, in terms of the x and y of the axes. However, the vectors with larger vertical component appe...

2 years ago | 0

Answered
How can i change this to a multiselect loop?
It's not clear exactly what read6840 is intended to do, so I can only offer an outline of how it might look operating on multipl...

2 years ago | 0

| accepted

Answered
Matlab GUI to select and plot data from csv file.
Notice what the error message tells you: "You might see this error if any of the variables in the figure's SizeChangedFcn are un...

2 years ago | 0

Answered
Why do i receive the error:" unrecognized function or variable "Fun"?
Maybe you mean feval instead of fun.

2 years ago | 0

| accepted

Answered
Help with populating a vector with 2 random variables
max_value = (numChannels-1)/2*channelSize; values = linspace(-max_value, max_value, numChannels);

2 years ago | 0

| accepted

Answered
heatmap help - how to display grouped data across 3 levels (LO, MED, HI) ?
You can make a variable that has three distinct values, say 0 for LO, 1 for MEDIUM, and 2 for HI, which can be constructed as fo...

2 years ago | 0

| accepted

Answered
How to avoid clicking buttons in GUI with uiwait in a script
A Java Robot can be useful to automate GUI interactions. https://undocumentedmatlab.com/articles/gui-automation-robot https://...

2 years ago | 0

Answered
Setting handles from one GUI to another GUI - Matlab
Here's how you can do it. (test1 and test2 m- and fig-files are attached; contents of test2.m reproduced below.) function varar...

2 years ago | 0

Answered
How to export a cell array consisting of matrices in each cell into different excel sheets in single workbook?
"... i want all these matrices in each element of the cell array T to get exported out into an excel workbook which has 3 excel ...

2 years ago | 0

| accepted

Answered
Writing an excel sheet through MATLAB, then adding that sheet to an exisiting excel file (microsoft office 97-03 (.xls))
Have you tried this? C = {'cool','this','actually','works'}; filename = 'C:\Users\user\OneDrive - User\Verification\Results.xl...

2 years ago | 0

| accepted

Answered
a function to save a plot as a (compressed) image file.
https://www.mathworks.com/help/matlab/ref/exportgraphics.html

2 years ago | 0

Answered
Read non-negative cells from a cell array
myFolder = '.'; filePattern = fullfile(myFolder, '*.csv'); csvFiles = dir(filePattern); N = numel(csvFiles); Data = cell(N,1...

2 years ago | 0

Answered
Write multiple columns of data in a single text file
data_to_write = [date(:,[1 2 3]) rain(:,1) tmax(:,1) tmin(:,1)]; fid=fopen(outfile,'wt'); fprintf(fid,'%d %d %d %5.2f %5.2f ...

2 years ago | 0

Answered
Getting variables from a custom function with a GUI
Use uiwait to pause execution of the code, in this case pause until the figure is deleted, and delete the figure in the submit b...

2 years ago | 1

| accepted

Answered
How to reduce size of points on a plot?
% example data: xData = (1:10).'; yData = (1:10).'; zData = rand(10,1); % perform the fit: ft = 'loess'; [fitresult, gof...

2 years ago | 0

Answered
How I can draw two animated plots on one plot at the same time with different colours to compare them online?
AnimL = animatedline('Color','r'); AnimL2 = animatedline('Color','b'); for i=1:111 axis([0 i -1 1]) addpoints(AnimL,...

2 years ago | 0

| accepted

Answered
How to get a colorbar to show only a specified range of values?
Use clim(). Example: % made up variable values: X_ert = 1:550; Z_ert = 2080:2180; ert_interp = exp(cosd(X_ert(ones(numel(Z_e...

2 years ago | 0

Answered
colorbar not working?
The black you see is grid lines of the surface. You can turn them off by setting the surface EdgeColor property to 'none'. clc;...

2 years ago | 1

| accepted

Answered
How to match a matrix of features with a bunch of .mat files?
% unzip the zip file unzip('feature.zip') % get info about the mat files anywhere under the feature directory: files = dir(...

2 years ago | 1

| accepted

Answered
Looping through Axes on figure created using subplot
hf1=figure('position',pos,'Name','4LineScan'); % pos defined elsewhere % store the axes in an array: ax = [ ... subp...

2 years ago | 2

| accepted

Answered
How do I repetitively shuffle elements in my matrix column-wise?
Looks like this is what you are going for: [m,n]=size(F); % F = 582x255 matrix for i = 1:n C_i = F(:,i); C_i_s = C_...

2 years ago | 0

Answered
miss name columns in my table
app.UITable2.ColumnName=UIT2.Properties.VariableNames;

2 years ago | 0

| accepted

Load more