Answered
How can I convert a multidimensional array to csv ?
csvwrite is deprecated in favor of writematrix for arrays but is not documented for table inputs (at least thru R2019b). Having...

6 years ago | 1

Answered
How can I re-open a closed figure from a stored plot handle?
No. All the plot_data array contains is the handles to the chart surface objects that were created by surf. However, even thou...

6 years ago | 1

| accepted

Answered
How to change the xticketlabe of a bar chat
You can either just set xticks where you want them or use the x vector in bar if there are other than just ordinal positions for...

6 years ago | 0

| accepted

Answered
smoothed scatter plot matlab like excel
fXY=fit(X,Y,'smoothingspline'); plot(fXY,X,Y,'b-') fXYv=fit(Xv,Yv,'smoothingspline'); plot(fXYv,Xv,Yv,'r-') Above needs Curv...

6 years ago | 0

Answered
How to read satellite data with .dim and .data folder in Matlab
I was looking for the support site for the source of the data -- generally there will be links to how to use the data with MATLA...

6 years ago | 0

Answered
How to read csv file containing text and numbers in the same cells
Wowsers! That's a nice file format for reading visually, but surely a pain to postprocess. Can you not set the machine up to o...

6 years ago | 2

| accepted

Answered
How to check if a multi-column row of a matrix exists in another matrix
"...there are no easy, single line solutions to this." Au contraire, good buddy! :) >> C=A(~ismember(A,B,'rows'),:) C = ...

6 years ago | 0

| accepted

Answered
Undefined function or variable
As noted above I don't know for certain whether the Date2Num is just a missing m-file or an attempt to use a Python function. Y...

6 years ago | 1

| accepted

Answered
Monthly maximum in data
t = datetime(2018,1,1:500)'; rsq = [rand(500,1) day(t) month(t) year(t)]; Alternatively for the same data structure above: ma...

6 years ago | 1

Answered
How to do a Loop statement from cell to double?
Use ordinal categorical variables -- t1989=readtable('1989.xlsx','Range','10:40','ReadVariableNames',0); % get in a set of ...

6 years ago | 2

| accepted

Answered
Redefining a variable in a multidimensional array
There isn't a time vector explicitly stored in the 3D array; each slice(*) in the array is associated with the corresponding tim...

6 years ago | 0

| accepted

Answered
Forcing a scalar to be represented as a 1x1 vector
By the table in the documentation, >> jsonencode({c}) ans = '[4]'

6 years ago | 2

| accepted

Answered
Use text in table to make variables
Do NOT even think about doing this.

6 years ago | 0

Answered
Replacing empty cells using for loop
Short answer is, "you can't". A double array cannot have an empty element; it is either empty or full. A cell array is the on...

6 years ago | 1

| accepted

Answered
How do position coordinates work on a subplot?
It appears that those [x,y] positions are the image indices from the upper left of the image. If you look at the two examples a...

6 years ago | 1

Answered
using fwrite for multiple data type at once
The precision, skip, machinefmt optional inputs to fwrite have not been vectorized (as you have discovered), so you can't interm...

6 years ago | 0

Answered
How can I import multiple .CSV files in MATLAB and SISTEMATICALLY process the data of each file?
See <Importing-all-files-from-a-specific-folder?> from yesterday. There's a section in the doc with examples on processing mult...

6 years ago | 0

Answered
Importing All Files from a specific Folder
datapath=uigetdir([],'Select Data Directory'); d=dir(fullfile(datapath,'*.txt'); for i=1:numel(d) txt_file = fullfile(data...

6 years ago | 0

| accepted

Answered
How can I draw a six graph together in one figure using plot and hold on?
Replace for Q=1,6; plot(T,K(:,Q)); end with hL=plot(T,K); plot (like almost all MATLAB functions) operates by column and t...

6 years ago | 0

Answered
How to calculate the quantiles/percentiles values for each hour?
Use grouping variables and splitapply or put into a table or timetable and then rowfun and/or retime (timetable) are also option...

6 years ago | 0

Answered
Error using tiledlayout syntax instead of subplot when referencing axes handles
tiledplot is only able to put one axes object per tile, sorry. Another user wanted two y-axes just yesterday... <Answers/72148...

6 years ago | 0

Answered
Get supersets from cell array of doubles
I misread the problem statement originally and the second idea didn't really help all that much. It's fairly straightforward, t...

6 years ago | 0

| accepted

Answered
Insert time depending on sample time and measurement points into existing table
In "the MATLAB way", don't use loops where not needed...since you have end points and number, use linspace ST = 3; ...

6 years ago | 1

| accepted

Answered
Inserting Array into Another Array
ix=true(size(a)); ix(x)=false; z(ix,1)=a;

6 years ago | 0

| accepted

Answered
How to find indices of non duplicate rows in a matrix?
>> A = [1 1 2 2 3 4 5 6 6]; >> [n,b]=histc(A,unique(A)); >> A(ismember(b,find(n==1))) ans = 3.00 4.00 ...

6 years ago | 0

| accepted

Answered
error converting chars to string
You've previously defined Samples as a cell array (either deliberately or by accident) -- >> Samples={} Samples = 0×0 empty...

6 years ago | 0

Answered
Splitting data array into sub arrays
>> SIC=[3301, 4502, 3306, 4602, 4510].'; >> splitapply(@median,SIC,findgroups(fix(SIC/100))) ans = 3303.50 450...

6 years ago | 1

| accepted

Answered
Adding a second x-axis to each plot in a tiled layout / subplot
The tiled layout object is documented as "A tiled chart layout contains an invisible grid of tiles that covers the entire figur...

6 years ago | 0

Answered
cell to matrix in matlab
>> X=[{[[2:2:10].' rand(5,1)]},{[[1:2:10].' rand(5,1)]}] X = 1×2 cell array {5×2 double} {5×2 double} >> [X{1}(:,...

6 years ago | 0

Answered
Input only numbers from .txt file and store numbers
It would be better to write a more parseable text file, at least with a delimiter if not multiple records... With just highleve...

6 years ago | 0

Load more