Answered
Convert different datetimes into one format
Bestest would be to fix the input source to use the same format but you can try some subterfuges to see if you can sneak by with...

6 years ago | 0

| accepted

Answered
Hat on letter on x/ylabel WITHOUT using LaTeX?
figure, plot(sort(rand(10,4))) % preliminaries... % engine hTxt=text(4,0.6,'x'); % location arbitrary for given dat...

6 years ago | 0

| accepted

Answered
How to delete the first 2 rows (Headers) of a txt file ?
Well, once you've got the right content in memory, then just rewrite the file. But, specifically on that has some bearing on th...

6 years ago | 0

| accepted

Answered
touchstone file could not be processed in matlab
For your specific data file in order to not have to modify the file, the following should return the data in usable fashion... ...

6 years ago | 0

| accepted

Answered
How to delete the first 2 rows (Headers) of a txt file ?
Or, readtable. But, starting with the above simply file=regexp(fileread('data.txt'), '\r?\n', 'split') .'; file=file(3:end); ...

6 years ago | 0

Answered
Merge vector to matrix
In what form do you have the data to start with? If it's a file with the content of the document shown, then just read the file...

6 years ago | 0

Answered
How can I use different sizes with text
Ayup...except you'll have to either write as a loop using sz(i) for each since 'fontsize' at the command level is global to all ...

6 years ago | 0

| accepted

Answered
Error while using a function.I need parentheses in the function header but it wont allow me to do it.
No, don't need any parens (and remove the semicolon, too) in the function dummy argument list, those are surrogate names for the...

6 years ago | 2

Answered
How can I colour in different colours 2 rows of ylabel using Latex as interpreter?
Well, it finally dawned on me how to work around your particular wish... hTxt(1,1)=text(-0.1,0.55,{'$\tilde{\mu}_c$'},'Interpre...

6 years ago | 1

| accepted

Answered
Find the last NaN value in cell array and compare it with the next column
Yeah...the nonnumeric content of the cells containing hex strings changes things...those all return a logical array and not just...

6 years ago | 1

| accepted

Answered
Multiply nth elements of an array by an element of a different array?
I'll presume the answer to Cyclist's 2nd Q? is to be unchanged...and the other is just using different variables for the posting...

6 years ago | 1

| accepted

Answered
Replace a single character with a new line in a string
>> s= 'hello there how are you today'; >> strip(split(s,'w')) % if the location is a known character... ans = 2×1 cell ...

6 years ago | 0

Answered
normcdf: speed impact by vectorization
Yeah, there is... -- >> a = -50:0.01:50; >> total_cnt = 10000; >> a_mod = repmat(a, 1, total_cnt); >> whos a a_mod Name ...

6 years ago | 0

| accepted

Answered
using fsolve when the function handle takes in 2 variables that are both vectors
Recast as 4-vector w/ v(1:2) -- x; v(3:4) -- y: fun2=@(x) [exp(-exp(-(x(1:2)+x(3:4)))) - x(1:2).*(1+x(1:2).^2); ... ...

6 years ago | 0

| accepted

Answered
How to create a vector which displays the letters used in an already existing string?
>> unique(erase(s,' ')) ans = 'adehijlmnosuwy' >> unique(erase(s,' '),'stable') ans = 'helomynaisjwdu' >> >> uni...

6 years ago | 0

Answered
Multi-colored tick labels in bold, redux
Looks mostly to be the choices for the rgb triplets aren't very distinctive, but a contributing factor is there just aren't many...

6 years ago | 0

| accepted

Answered
averaging values in a table in succession
t=readtable('nim123.xlsx'); % read the data t(all(isnan(t{:,:}),2),:)=[]; % remove the blank lines at beginning...

6 years ago | 1

| accepted

Answered
put a missed data in a cell
If you build the cell content, there's no reason shouldn't be able to just assign it to the cell array where it belongs. Then j...

6 years ago | 0

| accepted

Answered
[DEPRECATED] What frustrates you about MATLAB?
Why can't MATLAB/TMW figure out to not open new figure default inside command window space so the next command to put on some am...

6 years ago | 0

Answered
How to plot z values against year in x-axis and months in y-axis?
[Y X]=meshgrid([1:12],tRAIN.YEAR); contour(X,Y,tRAIN{:,2:end}) yticklabels(tRAIN.Properties.VariableNames(2:end)) Just for co...

6 years ago | 0

Answered
Calculating average of cell arrays
mnTemp=cellfun(@(t) mean(t.precip),SAMPLE); with the sample dataset: >> cellfun(@(t) mean(t.precip),SAMPLE) ans = 27.898...

6 years ago | 1

| accepted

Answered
How to export the result of the function fit to a file?
It's not a symbolic object, nor a function--it's a cfit object. It has associated methods and the default method is to evaluate...

6 years ago | 2

| accepted

Answered
Setting certain edges of a graph a different color
You mean like the following: subplot(2,1,1) plot(rand(10,1)) title('default -- top/bottom outlined w/ box on') subplot(2,1...

6 years ago | 0

Answered
create vector with number of hour per years
Oh. I see at the beginning you did create a timetable -- good! Just use it-- tt_BUOY_ERA5.Properties.DimensionNames={'Time','...

6 years ago | 0

| accepted

Answered
How can I read block of data using textscan?
Basics are: fnames={'Lpp','xnstrp','nptstrp','offsets','c'}; % define struct fieldnames inp=cell2struct(cell(5,...

6 years ago | 1

| accepted

Answered
[DEPRECATED] What frustrates you about MATLAB?
Inconsistency in names for Name-Value Pair arguments in new functions of similar purpose and name. Since inception which predat...

6 years ago | 2

Answered
Is calling length() as needed slower than storing the value just once in a separate variable?
Any computation has a finite speed...even memory access alone. Builtin data types contain a knowledge of the dimensions allocat...

6 years ago | 0

| accepted

Answered
the reason of why there is a warning like that?
<Answers/99745-why-do-i-get-warning-message-matrix-is-close-to-singular-or-badly-scaled?>

6 years ago | 0

Answered
importing data using function change the colomns order
Worked ok here... >> data=import_sitefile('strikeLdep5.dat',22); >> whos data Name Size Bytes Class ...

6 years ago | 0

| accepted

Answered
How to remove color bar in the matlab heatmap and add one to the whole subplot?
ERRATUM: My bad, I had other figures around and didn't realize the heatmap object is child of the figure, not of an axes on the...

6 years ago | 0

| accepted

Load more