Answered
why xlswrite/xlsread is not recommended for use
See xlsread for the official word from TMW (The Mathworks). From the supporting link there is the following Advantages [of ...

3 years ago | 1

Answered
generate mean, variance and std using built in function
stats=[[mean(A,2);var(A,2);std(A,2)]; [mean(A,1);var(A,1);std(A,1)];] will give you and array of the statistics by clas...

3 years ago | 0

Answered
Trying to get certain values from an excel file
Perfect place for a table -- keeps everything together with variable IDs and you have access to everything as you need it. I do...

3 years ago | 0

Answered
Is it possible to plot the 'i'th set of data from a switch case with a single block of code?
If it's the same code identically for each case but with a different dataset based on the index, that's all you need -- you don'...

3 years ago | 1

| accepted

Answered
Plotting with Stem in different colours in 1 step
Can't be done that way at all -- the stem plot creates a single object handle so there's only one color property for it; not mul...

3 years ago | 0

| accepted

Answered
how to replace readcell by xlsread?
"xlsread is not recommended. Use readtable, readmatrix, or readcell instead." You apparently also did not read the documentatio...

3 years ago | 2

| accepted

Answered
Show text on line in a legend
Can't use legend to do that -- the text is not part of the linestyle but a separate object you've added independently. You'll h...

3 years ago | 0

Answered
How to determine the x intercept between a function and a yline?
You've got to have the two separate pieces of the double-valued function for interp1 to work -- >> [mnX,imnX]=min(LSFfit_x); >...

3 years ago | 0

| accepted

Answered
for-next loop parameter gets printed out
You've got a malformed for expression, the comma serves to make a second line of code on the same source line; the value of ll i...

3 years ago | 0

| accepted

Answered
I want to draw the previous point Delete the next point
I had not poked at an animatedline object with Yair Altman's FEX submission to find hidden properties, but it turns out the X|YD...

3 years ago | 0

| accepted

Answered
the 'polyarea' function dose not work well. how to solve it?
>> VFR=[VFR_lat_merged VFR_lon_merged]; >> find(any(~isfinite(VFR),2)) ans = 102 >> VFR(ans-5:ans+5,:) ans = 37.5443...

3 years ago | 0

Answered
What dose this mean?
Basically, just what it says -- albeit somewhat wordily, perhaps... :) A vector in 2D has X,Y components; a complex variable ca...

3 years ago | 0

Answered
How do I split a data set into multiple chunks based on a re-occuring value?
data=readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1102540/Temps.txt'); iT=(data(:,1)==-99999); n...

3 years ago | 0

| accepted

Answered
I want to get a linear curve fitting for each line in graph
The Statistics Toolbox has a function lsline that does this automagically but for some reason that is totally unexplicable to me...

3 years ago | 0

Answered
Overwriting Grid Layout Does Not Delete Existing Grid Layout.
Well, still without any real klews as to what it is you're trying to do here, I believe that based on my reading of the doc of s...

3 years ago | 0

Answered
Solving a equation from excel.
Going at it hard way...first, just read the data as a table and can keep the variables as identified already... >> tTrail=readt...

3 years ago | 0

| accepted

Answered
How do I count the number of Functions in a Function Handle?
With coding style constraints fun_hand = @(x)[mod(x,5);mod(x,3);x.^3;floor(20./x)].'; % the (constrained) engine nFuncs=@(s)n...

3 years ago | 1

| accepted

Answered
sum columns with headers containing specific characters
tB=tData(:,contains(tData.Properties.VariableNames,'A_side')); Should be able to figure out the other from that... :) But, I...

3 years ago | 1

Answered
Get every nth row of a tall array
Actual Text: "******** 7.909" The problem is in the data file itself -- there's an oveflow field indicator of "*" in a numeri...

3 years ago | 0

| accepted

Answered
varfun changes the variable names in the table
Because you operated on it with a function and so it is NOT the same variable any more -- that is documented behavior. varfun d...

3 years ago | 1

| accepted

Answered
Plot with bar side by side and with two y axes
You can't have two overlaying axes with the same x value and use bar with only a single variable because then the bars will alwa...

3 years ago | 1

| accepted

Answered
Renaming multiple excel sheets
Just name them as you want them when created them instead... %% Create a folder where the data will be saved OutputFolderName...

3 years ago | 0

| accepted

Answered
Extract specific info out of file
txt=readlines('yourfile.txt'); writematrix('yournewfile.txt',txt(~contains(txt,'notpassed')),'filetype','text','quotestrings',0...

3 years ago | 1

| accepted

Answered
Compile data from excel sheets into a dataset with multiple tags
Sure it's possible. Just parse the sheet names when reading them and do similarly as I did excepting with Date, Valve, Powder v...

3 years ago | 0

| accepted

Answered
String in a Loop
In In_Use_Legend=hgdawe(bbT:ccT); you didn't subscript your lookup array variables but refer to the arrays each in their entir...

3 years ago | 0

| accepted

Answered
Now, I need help with coding part as to copy and paste the data from one file to another but section wise with the same line name in place. Thank you
Try this...looks like it worked ok, but you'll need to check carefully; I just did casual look-see. This demands that the file ...

3 years ago | 0

| accepted

Answered
Saving figures and automatic legend
You only saved a handle to the current axes via gca at the end -- but you created three (3) axes via subplot Save the handles o...

3 years ago | 0

| accepted

Answered
what is the best way of showing legend?
You don't explain what you don't like nor show us what you got and we don't have your data, so we're flying blind here, but I'll...

3 years ago | 1

| accepted

Answered
How to group different values in an array?
Why are you holding numeric data as strings??? Even if stuff goes together somehow, use an array although it would seem likely g...

3 years ago | 0

Answered
How do I display a number as a percetage within a table?
No can do...and leave as a number, anyways. tables are calculational tools and MATLAB is NOT a spreadsheet and the view of the ...

3 years ago | 0

Load more