Answered
Matlab Table / Dataset type optimization
_"Matrix is very fast, [but] you can't always remember variable name by column index."_ If speed is the goal, you can't beat ...

9 years ago | 1

Answered
Delete Empty Rows in a Cell Array
[~,~,raw]=xlsread('StimuliInExcel.xlsx', 'WilliamsList'); raw=raw(~all(cellfun(isempty,raw),2),:); xlswrite('StimuliInEx...

9 years ago | 0

Answered
Change x-axis label font size?
See <http://www.mathworks.com/help/matlab/ref/numericruler-properties.html <numeric ruler properties>>. Have to have HG2 (R2014...

9 years ago | 0

Answered
How to clear a variable if "clear" is itself a variable?
See previous poster's dilemma resolved at <https://www.mathworks.com/matlabcentral/answers/35475-overwrote-clear-function?s_tid=...

9 years ago | 1

| accepted

Answered
Difference linear regression / linear solver
As commented above, if given same problem, all return same result-- >> x=1:10;y=x+rand(size(x)); >> b=polyfit(x,y,1) b ...

9 years ago | 0

Answered
Why does fit curve extend longer than data?
# Evaluate |yhat=model(x)| explicitly at the points desired in vector _x_, or # Retrieve the _[X|Y]Data_ arrays from the figure...

9 years ago | 0

Answered
Running the bat file
When the new process is spawned, it inherits default environment (PATH and other variables). If python isn't installed on that ...

9 years ago | 0

| accepted

Answered
Need help with loops
Rewriting the above to compute for any number of bets would seem simplest-- function [stat,mxIdx] = bestbets(odds) % ret...

9 years ago | 0

| accepted

Answered
How to add more variables in script function file....
Just as confirmation you really, really, really don't want to do this, I took the above first 16 terms portion of the expression...

9 years ago | 1

Answered
How to add more variables in script function file....
Why in the world would you even attempt to write every element out explicitly for 1200 terms???? Pass the coefficients as well....

9 years ago | 1

Answered
How can I read in data and sparse each column into vectors with the saved variable name?
Try the newer |*table*| class... data=readtable('asec_swrat_80_16_diff.csv'); See doc table % and read _concept...

9 years ago | 0

| accepted

Answered
"To RESHAPE the number of elements must not change" error during plot
"S4(t)" is symbolic and a (very) long character expression whereas "t" is double vector. *plot* is trying to turn them both int...

9 years ago | 0

| accepted

Answered
How to write a mixed data (text and number) in a CSV file ?
It seems like "'round Robin Hood's barn!" way to get there, but believe it or not, fname='yourfile.csv'; writetable(cell...

9 years ago | 2

Answered
extracting data from text file
>> 27*3500*8/1024/1024 ans = 0.7210 MB >> Isn't all that big by today's standards. Just read the file and do whatev...

9 years ago | 0

Answered
How can a make a matrix which keeps on updating itself and after the loop is over its saves it as a cvs file?
coefficients=zeros(100,9); % preallocate for k=1:100 % stylistic hint: use variables ...

9 years ago | 0

| accepted

Answered
creating array of fix and changing variables for xlswrite export
>> [{' '} col_header] ans = ' ' 'Col1' 'Col2' 'Col3' 'Col4' 'Col5' >> You've added a blank column t...

9 years ago | 0

Answered
Controlling format (number of decimals) of specific ticks
figure hAx=axes; xtklab=get(hAx,'xticklabel'); xtklab{1}='0.000'; set(hAx,'xticklabel',xtklab) results in <...

9 years ago | 0

| accepted

Answered
Excel Bubble Chart Code
pt=PulleyTable; % shorten the name... scatter(pt.X,pt.Y,pt.D.^2/6,'filled') xlim([-400 400]), ylim([-50 250]) grid o...

9 years ago | 0

| accepted

Answered
Plot normal distribution that range from -1 to 1
Well, per the comment, you can't have both...try x=linspace(-1,1); plot(x,normpdf(x,0,1/3.5)) You can adjust the divi...

9 years ago | 0

| accepted

Answered
Annotation with fraction and upright Greek letters
Try annotation('textbox',[0.2,0.6,0.1,0.1],'String','$$\frac{\Delta - \Gamma}{\delta}$$','interpreter','latex') and mess...

9 years ago | 0

Answered
How to scale y-axes in subplots so that the length of one data unit is equal between the different subplots.
Basically Adam's comment as Answer with a little detail... for i=1:3 hAx(i)=subplot(1,3,i); % create the plot cod...

9 years ago | 0

| accepted

Answered
How can I concate two datatime and two double format arrays into one table, and use the array names as the titles?
Presuming the all have the same number of rows (a requirement for a table), then overallMaxTq = table(overallTqMaxTime1A,ov...

9 years ago | 0

Answered
How to transform a 1d vector of multiple elements to 1 element?
Try Jan's most-excellent FEX submission <https://www.mathworks.com/matlabcentral/fileexchange/31272-datahash <datahash>>

9 years ago | 0

Answered
How to use the formula extracted from a curve fitting algorithm
It's not clear to me why you can't just use the returned fit structure for whatever it is that you needs must want to do, but to...

9 years ago | 1

| accepted

Answered
Creating Feature vector in .mat file
|*graycoprops*| returns a structure containing the requested statistics in fields of each name; hence you got what you requested...

9 years ago | 0

| accepted

Answered
plot the values of two columns of a table
Matlab doesn't understand ',' as a decimal point so your data are character array images of the input file, not numeric for the ...

9 years ago | 0

Answered
converting miliseconds to datetime value in datastore
Bad format string...use '%{HH:mm:ss.SSSSSS}D' instead. Cap 'S' is fractional seconds, lowercase 's' is seconds with |*d...

9 years ago | 0

Answered
Trouble importing text file as matrix
There's not a prepackaged routine to read multiple groups of data; you'll have to "roll your own" solution here. I'll show a co...

9 years ago | 0

Answered
functions with for loop
Your heat transfer model has to be dependent upon something else to cause it to return different values; you show arguments (x,y...

9 years ago | 0

Load more