Respondida
Undefined function 'uifigure' for input arguments of type 'char'.
The function code works here although the controls are not spaced/sized such that they are all contained within the default uifg...

más de 3 años hace | 0

Respondida
Import data from a bad format
The '%g' format has struck again -- that's what killed @Walter Roberson's approach. While not the most efficient, a simple way ...

más de 3 años hace | 1

Respondida
Can't seem to create a new column with the right type
We don't have the input file and you neglected to tell us even what variable you couldn't covert so not much can be said about f...

más de 3 años hace | 0

Respondida
how to select multiple time ranges in a timetable?
That's pretty remarkable, indeed -- wonder how it managed to fake the output? I thought first that just maybe the newest, onlin...

más de 3 años hace | 0

Respondida
How to apply one colormap to multiple ocean colour subplots
This is not a MATLAB problem, per se, since you're using the <M_Map Application>. Only someone else with the package installed ...

más de 3 años hace | 0

Respondida
eliminate a letter after getting a matrix data from text file
I've given you the Answer for both of these earlier at the <Original Q? Thread> location and the followup discussion. Will clo...

más de 3 años hace | 0

| aceptada

Respondida
Read text file after a specific text line but avoiding only the next line
fn='https://www.mathworks.com/matlabcentral/answers/uploaded_files/1376874/CISMID_SC_SCARQ_NEW_TOCHECH.txt'; data=readmatrix(fn...

más de 3 años hace | 0

| aceptada

Respondida
How to place tick-labels on the axis, essentially replacing the ticks with the labels?
That's theorectically possible, but would be a pit(proverbial)a(ppendage) to accomplish; MATLAB HG2 has no provision to do any s...

más de 3 años hace | 0

Pregunta


Import Options Missing Variable Flexibility Between Missing Record and Variables
The import options object has the 'MissingValue' rule, but as far as I can tell it's an "all or none" affair, one either fills e...

más de 3 años hace | 1 respuesta | 0

1

respuesta

Respondida
Remove specific rows of matrix from memory not just delete them
Use MATLAB <logical addressing> and vectorized operations-- Hf=Hf(HF~=0); for the case you show that Hf is a vector. If it we...

más de 3 años hace | 1

Respondida
I have a set of data that I need to separate into unequal intervals in order to calculate the RMS value of these data (The data points are continuous over time)
For the solution for all torque levels without collapsing any, tq=readmatrix('Torque Data.xlsx'); d=[true; diff(tq(:,2)) ~= 0...

más de 3 años hace | 0

| aceptada

Respondida
how to plot a bar graph using for loop?
%Read the data from positive test results %data.COVIDStatus(k)==1 %Include data which satisfies k condition for the appropriat...

más de 3 años hace | 1

Respondida
When creating an app, how do you plot points on top of a line on a UI axis?
% We will write the following code in the button push function, % since we want the push of this button to 1.) main_axes = ap...

más de 3 años hace | 0

Respondida
How can I use a for loop to interpolate to a certain number of points, and remove NaNs?
Like @Rik, I don't understand the desire well enough to know precisely the result you're looking for, but to find the locations ...

más de 3 años hace | 1

Respondida
A suitable method to detect outliers from a non-normally distributed dataset?
You made it notoriously difficult to do anything to help by not attaching the data in a usable form, but... fn='https://www.mat...

más de 3 años hace | 1

Respondida
autocorr, xcov, xcorr, which one should I choose to calculate auto-correlation function? And what's the difference among them?
Doesn't really matter although from the doc, the autocorr function in the Econ TB uses the FFT to compute and then IFFT to retur...

más de 3 años hace | 0

Respondida
Labels in Stackedplot generated from Arrays
You mean something like hS=stackedplot([1:100]',randn(100,2)); hS.DisplayLabels={'Mag','Phase'}; hS.XLabel='Frequency';

más de 3 años hace | 0

| aceptada

Respondida
Saving output in different rows with subsequent runs of my program.
See the 'append' value for the 'WriteMode' named parameter in <writetable>. Far more efficient would be to wrap your code as a ...

más de 3 años hace | 0

Respondida
how to create legend from neighboring column in 3d plot
Why folks continue to beat head against wall with deprecated xlsread is beyond ken... fn='https://www.mathworks.com/matlabcentr...

más de 3 años hace | 0

| aceptada

Respondida
Add commas between number columns from text file
Given the fixed format nature of these files, the best thing to do is probably to just build a specific fixed-width import optio...

más de 3 años hace | 0

Respondida
Add commas between number columns from text file
fn='https://www.mathworks.com/matlabcentral/answers/uploaded_files/1367139/ReactionsPortic5Combination4.txt'; opt=detectImportO...

más de 3 años hace | 0

| aceptada

Respondida
How to create string of text-objects
Holding disparate data types would be a good place to use a table as alternative to the cell array... D = [randi(100,10,1),rand...

más de 3 años hace | 1

| aceptada

Respondida
How do I save the output from a double for loop to a vector?
counter = 0; VectorOfValues=zeros(24,1); % preallocate for n = 0:23 for i = 1:height(Exceldata) if (duration(n,0,0...

más de 3 años hace | 1

| aceptada

Respondida
Graphing an array by largest row to smallest row
output_array = {[1,2,3]+0; [1,2,3,4,5]+0.1; [1,2,3,4]+0.2}; [~,ix]=sort(cellfun(@numel,output_array),'descend'); ix=num2cel...

más de 3 años hace | 0

Respondida
How to sorting categorical array for plotting
function male=MakeMaleSample(n) male=categorical("M"+1:n,"M"+1:n); end To force a non-lexical sort order, you have to speci...

más de 3 años hace | 1

Respondida
Place filenames with common pattern in a cell array
C = {'breakpoint_b40_f15.txt', 'breakpoint_b50_f15.txt', 'breakpoint_b40_f20.txt', 'breakpoint_b50_f20.txt', 'breakpoint_b40_f25...

más de 3 años hace | 0

| aceptada

Respondida
I am getting "Conversion to logical from table is not possible." error, how do you solve it?
... data1 = readtable('data1.csv'); data2 = readtable('data2.csv'); ... You read a csv file as a table; the two variables ar...

más de 3 años hace | 1

Respondida
Subdividing column matrix based on two stored indices of different lengths
A = [0.0048;-0.001;-0.0042;0.0047;-0.00011;0.0025;0;0;0;0;0.0023;0.0004]; order =[4;5;6;7;8;9;1;2;3;10;11;12]; pull = [7;8;9...

más de 3 años hace | 0

Respondida
ERA5-Land: error calculating hourly radiation
Seems very peculiar way to have done, but I'd just fix the date and then process by it instead... % Load the NetCDF file ... ...

más de 3 años hace | 0

Respondida
Separating text files according to latitude and longitude
Sure. Just read the lat/lon data file, substitute the dot woth underscore and do a dir() with that string in the filename wildc...

más de 3 años hace | 0

Cargar más