Risposto
How do I save data from a fprintf loop?
msgs=string(N,1); for ii=1:N .... msgs(ii)=compose(['\nDecoded Message = %2d\n Coded: Error rate = %1.2f, ' ... ...

circa 4 anni fa | 0

| accettato

Risposto
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 ...

circa 4 anni fa | 1

Risposto
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...

circa 4 anni fa | 0

Risposto
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...

circa 4 anni fa | 0

Risposto
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'...

circa 4 anni fa | 1

| accettato

Risposto
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...

circa 4 anni fa | 0

| accettato

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

circa 4 anni fa | 2

| accettato

Risposto
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...

circa 4 anni fa | 0

Risposto
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); >...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 0

Risposto
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...

circa 4 anni fa | 0

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 0

Risposto
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...

circa 4 anni fa | 0

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 1

| accettato

Risposto
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...

circa 4 anni fa | 1

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 1

| accettato

Risposto
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...

circa 4 anni fa | 1

| accettato

Risposto
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...

circa 4 anni fa | 0

| accettato

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

circa 4 anni fa | 1

| accettato

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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 ...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 0

| accettato

Risposto
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...

circa 4 anni fa | 1

| accettato

Risposto
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...

circa 4 anni fa | 0

Carica altro