Answered
Daily average precip for many years
Just taking a stab presuming the file is something recognizable-- precip=table2timetable(readtable('yourfile.ext')); % rea...

8 years ago | 1

| accepted

Answered
i want to make the rows of some elements values empty and should be maintain the other row value
You can't make m(2,:) be four elements long while m(1) is 9 (or anything other than also four for that matter) as arrays must be...

8 years ago | 0

| accepted

Answered
Is the anyone can explain this scaling function?
Well, we don't really either without what the handles.data.J are, but one can presume the |Position| variable is the axes _'Posi...

8 years ago | 0

Answered
How to adapt the space between the grid lines to the space between the ticks?
You have to address the proper axes object to change its properties...to make working with multiple axes easier, be absolutely s...

8 years ago | 0

Answered
How to get rid of the date on a plot over time?
Can't by just using the format string for the datetime ruler object; it will put whatever is needed to make the date labels uniq...

8 years ago | 0

| accepted

Answered
How do I prevent the legend from REALLY auto-updating
Actually, it's simpler than outlined; that kept extra lines around; don't even need that; just use the builtin feature of plot()...

8 years ago | 1

| accepted

Answered
greek symbols in my code
<https://www.mathworks.com/matlabcentral/answers/334191-how-can-i-use-a-symbol-as-a-variable?s_tid=answers_rc1-3_p3_MLT#answer_2...

8 years ago | 0

| accepted

Answered
How to get amplitude of the signal from FFT results?
Had a fairly protracted discussion on subject recently here <https://www.mathworks.com/matlabcentral/answers/395585-normalize-ff...

8 years ago | 1

Answered
How to add error bars on bar graph with groups?
See <https://www.mathworks.com/matlabcentral/answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center#answer_302325 <E...

8 years ago | 5

Answered
Why is det a bad way to check matrix singularity?
You can start with <https://www.mathworks.com/help/matlab/ref/det.html#bubi9tw <Limitations of det>> for bare bones; I don't hav...

8 years ago | 2

Answered
how do i make a function repeat 10 times.
Guillaume addressed how to loop, I'll note that the double loop above can be written succinctly as W=filter2(ones(3)/9,p,'v...

8 years ago | 0

| accepted

Answered
How to shift the entire columns in raw file to the left and hence deleting all the empty columns in the sheet in matlab?
t=readtable(filename,'Sheet','Markings'); % tables are much more simpler than raw cell arrays ix=~all(ismissing(t)); ...

8 years ago | 0

Answered
For loop within a function f
f=@(x)((0.0011*(x(2+i*N:j*N)-x(2-1+i*N:j*N-1)))' *exp(-0.0078*x(Battery_num*N+1+i*(N-1):Battery_num*N+j*(N-1))))*Battery_cost/...

8 years ago | 0

Answered
How would I go about finding the standard normal probability based on the z-score?
doc normcdf doc normpdf When you know what you want but not sure the name, try something like >> lookfor normal re...

8 years ago | 1

| accepted

Answered
What is the precision of *.datenum, which dir() returns
|datenum| is a double; hence has 15-16 significant digits; the safest way to store it is as a double but you'll get as close as ...

8 years ago | 1

Answered
Biggest Error in Spline Interpolation
OK, good start and marks for posting work! :) You didn't define _x_ above; I presume you somewhere else did something like ...

8 years ago | 1

Answered
Only keeping minimum values in a matrix and setting them to 1
[~,ic]=min(D,[],2); % find location min each row D=zeros(size(D)); % ...

8 years ago | 0

Answered
How can I add a plot over a boxplot (same axis)?
Works ok here to plot() data on top of a boxplot; didn't use grouping variables though so the x-axes values are 1:N where N is t...

8 years ago | 2

| accepted

Answered
How to use a loop with datetime and store the datetime values?
dtday=[t1:datetime(2012,4,18+1)].'; % array of fixed start times each day dtm=[]; for i=1:length(dtday) d...

8 years ago | 0

Answered
How can I write into an excel file column wise?
for col=1,N V=yourColumnOutputFunction(... xlswrite(file,sheet,[xlsAddr(1,col) ':' xlsAddr(size(V,1),col)]); end ...

8 years ago | 1

| accepted

Answered
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Seems excessively strict given that the "extra-x" format is now default for all MS Office products; what's the reason isn't allo...

8 years ago | 3

Answered
fprintf cell array if its size changes
Sure...just build dynamic format string... >> fmt=['function dX = myFunction(' repmat('%s,',1,length(myCellArray)-1) '%s)\n...

8 years ago | 0

| accepted

Answered
What is the difference between .' and ' when transposing a matrix?
doc punct % Concise description of all Matlab punctuation-symbols syntax doc transpose doc ctranspose for the two ...

8 years ago | 1

Answered
File data with columns arranged with different number of rows.
With the assumption of just three specific arrays, the last idea-- a=length(A);b=length(B);c=length(C); % len...

8 years ago | 1

| accepted

Answered
Display time on boxplot
|boxplot| is another of the specialty plots that's somewhat hard to work with; TMW has a recent penchant for burying details tha...

8 years ago | 0

| accepted

Answered
Can I use a variable value as the name of a vector?
The short answer is "Don't do that!" <https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html <Don't use e...

8 years ago | 0

Answered
How can I select data that meet a certain criteria in two different data sets?
Didn't you just try it???? >> one=[1 2 3 7 9]; theother= [2 6 7 3 11]; >> ix=one>5 & theother<5 ix = 1×5 logical arr...

8 years ago | 0

Answered
How do I rescale a map picture so the axes are lat and lon
Presuming the two points are not on EW or NS line and have sufficient resolution, you can solve for the linear conversion of pix...

8 years ago | 0

Answered
Problem with fit function
>> fitn=fit(x1,y1,'exp2') fitn = General model Exp2: fitn(x) = a*exp(b*x) + c*exp(d*x) Coefficients (with ...

8 years ago | 1

Answered
MATLAB not calculate all my data
Was too tired last night; building fence is tough work for old men... :) Got 3 mi in; only 3 mi more to go... :) Try the fol...

8 years ago | 0

Load more