Respondida
Can I use "fitnlm" for multiple regression ? and How?
Well, I take that back...actually you could do it with fitlm if you do a change of variable... u1=x2.^n; u2=x3.^n; t=table(x...

más de 7 años hace | 0

Respondida
How do I make a smooth curve using the following data?
Presuming you first convert your data to arrays from cell array... plot(x1,y1,'x',x2,y2,'s') % plot the data only X1=l...

más de 7 años hace | 1

Respondida
read file with ascii characters and binary data on one single line
As noted in the comment, it's bizzaro way to have done, but the following seems to work... >> l=fgetl(fid);while ~contains(l,'#...

más de 7 años hace | 0

| aceptada

Respondida
Counting occurrences of a pair of numbers in a logical vector
Mayhaps one can get more cleverer, but I'm all for just "git 'er done!" ix=reshape(find(A),2,[]).'; B=zeros(size(A)); for i=1...

más de 7 años hace | 2

| aceptada

Respondida
Plotting scale bar with vertical margins
X=[0.2,0.1]; Y=[0.9,0.75]; E=[0.15,0.05]; % positions, bar length about midpint hEb=errorbar(X,Y,E,'horizontal','b.', 'l...

más de 7 años hace | 0

| aceptada

Respondida
Alternative to 'find' which won't return multiple values?
If you're using R2017b or later... [~,i10mx]=maxk(topfit,10); % return 10 largest positions in topfit vector topstac...

más de 7 años hace | 1

| aceptada

Respondida
how can I write two matrix into the same csv file
There's nothing in the documentation for writematrix that should have led you to think you could possibly do what you're asking ...

más de 7 años hace | 0

| aceptada

Respondida
how to use excel data in matlab for fast fourier transform?
[V,H]=xlsread('Vibration_analysis_FFT.xlsx'); % read data H % headers -...

más de 7 años hace | 0

| aceptada

Respondida
Return character array with increasing size based on input
strt=input('Starting letter: '); N=input('Number groups: '); % do your error checking here to ensure a single starting charact...

más de 7 años hace | 0

| aceptada

Respondida
Select which legend entries to use depending on data set plotted
... for positionnumber=[1:5] filename=strcat('M1_G1_','P',num2str(packagenumber),'_',num2str(positionnumber),positionl...

más de 7 años hace | 0

| aceptada

Respondida
Correlation Coefficient between multiple table columns
Try doc corrcoef % see examples re: NaN When you're still learning way around Matlab, a very useful (albeit old and prett...

más de 7 años hace | 2

Respondida
Plotting Matrix with Small and Large Values
'Kay; that's what I surmised...on one plot it's probably going to be messy no matter what you do. Two options I can think of Us...

más de 7 años hace | 1

| aceptada

Respondida
Find the desirable string and read data below them
function data=readTAUIJ(file) MAGIC_LINE_1='<INIT_MOD_TAUIJ_STAR>'; MAGIC_LINE_2='<XCPLJIJ>'; fid=fopen(file,'r'); ...

más de 7 años hace | 1

| aceptada

Respondida
Can I reorder the legend entries for gscatter
Yeah, just redo the legend manually with the handles in the desired ordered... ... hGS=gscatter(TA_est,TA_meas,strtrim(height)...

más de 7 años hace | 0

Respondida
Setting a logical matrix to a number
A logical array is either 0 or 1...if you put something else in an element, then the array can no longer be class logical You c...

más de 7 años hace | 0

| aceptada

Respondida
Converting Binary files to ASCII
OK, that's all you should need... fid=fopen('yourfile.ext','r'); data=fread(fid,[inf,4],'single'); fid=fclose(fid); should r...

más de 7 años hace | 0

Respondida
Finding the value of chi-squared for a linear fit
mdl=fitlm(xi,yi,'intercept',false);

más de 7 años hace | 0

Respondida
how to get back numerical value
F1_char = num2str(F_double); fprintf(fid, '%s', F1_char); You wrote the string representation of the values of F_double sequen...

más de 7 años hace | 0

| aceptada

Respondida
Plot a drawn, filled shape at each data point
S=1; % Side size X=50; Y=10; % location hR=rectangle('Pos...

más de 7 años hace | 0

Respondida
For loop in linear regression for number of assets
X = Indreturn; %(historical data of market index returns) Y=EFreturn(:,:); ...

más de 7 años hace | 1

| aceptada

Respondida
How to plot multiple horizontal bar plots in single figure?
You'll have to do that by having two axes so that you can have two separate barh objects...I've railed at TMW for 20 years about...

más de 7 años hace | 0

| aceptada

Respondida
How to get x-axis to be in seconds utilizing the timetick or comparable function
tfmt='dd-MMM-yyyy HH:mm:ss:SSS'; start = datetime('08-Feb-2019 07:32:50:503','InputFormat',tfmt); stop = datetime('08-Feb-2019...

más de 7 años hace | 0

Respondida
Function output into a variable
[r th]=AddVecPol(5,23,12,40); ML only returns results if you provide somewhere for it to throw them...otherwise the first of mu...

más de 7 años hace | 0

Respondida
writing output in excel file with variable to decide starting cell to write data
Sure, just use my little utility xlsAddr to build the address and pass to xlswrite for i=1:N output=yourfunction(data(:,i)...

más de 7 años hace | 1

| aceptada

Respondida
Polynomial equation not giving expected result
Just because the coefficient is small doesn't mean it isn't important...it is, after all the coefficient of x^5 and 75^5 = 2.373...

más de 7 años hace | 0

| aceptada

Respondida
Labeling Axises, YTick spacing, maximum and minimum labeling
>> [mx,i]=max(zc(:)) mx = 154.5315 i = 10403 >> [imx,jmx]=ind2sub(size(zc),i) imx = 101 jmx = 103 >> zc...

más de 7 años hace | 0

Respondida
Help with labelling the axes of a plot.
Something like hL=plot(reshape(t,12,[]),reshape(y,12,[])); is really easy to get the effect by ML's treating each column on ...

más de 7 años hace | 0

| aceptada

Respondida
How do I avoid scientific notation when using fprintf to print numbers into a text document?
If you want/need a specific format, say so... :) When you use '%d' for a floating point value, since it expects an integer valu...

más de 7 años hace | 0

| aceptada

Respondida
How can I move the Xlabel without moving the X-Axis?
You've got to override the default position data for the label when move the axis location to center-- Ylm=ylim; ...

más de 7 años hace | 0

Respondida
Determine if an array has any elements that are zero ?
function flg = isFullPoly(b) % isFullPoly(b) returns T if all coefficients, b, nonzero, F otherwise flg=all(b); end Thi...

más de 7 años hace | 0

| aceptada

Cargar más