Answered
How to extract data points from a .fig scatter plot?
openfig('YourFigFile.fig') hSc=findobj(gcf,'Type','scatter'); .X|Y|ZData properties are available from the scatter object hand...

6 years ago | 0

| accepted

Answered
Help creating a homogenous array when one or more columns has data type 'cell'
I'm guessing here, but try for i=1:width(t) if iscell(t{:,i}) t.(t.Properties.VariableNames{2})=cell2mat(t{:,2}); en...

6 years ago | 0

Answered
How to insert file name into an array?
str='../Documents/'; folder_name = uigetdir(str); d=dir(fullfile(folder_name,'*.dat')); for i = 1: length(files); fid=fope...

6 years ago | 0

Answered
Percentage of data in given range
Not a defined function, no. There are a couple of related in the Statistics Toolbox for percentiles, etc., but not what you're ...

6 years ago | 1

| accepted

Answered
How to return in Matlab specific array according to certain scheme?
function ret=binrestore(m,array) % returns binary decoded array values from input encoded array % multiple Mapped Value = ...

6 years ago | 1

| accepted

Answered
How to save a text file with headers?
function calibratedData = applyCal(fname,Ey,components,rawData,Calib) % applies calibration (gain and shift) to raw data; funct...

6 years ago | 0

| accepted

Answered
How to plot a graph along with axes graph?
Just build custom-placed subplot() axes...something like I=imread('ngc6543a.jpg'); % just an image to use later... f...

6 years ago | 0

| accepted

Answered
Plotting two data sets using the Curve Fitting Tool
Well, the old-fashioned way if all you wanted was the coefficients would be to use polyfit and polyval ...but since you have the...

6 years ago | 0

| accepted

Answered
How can we write data into csv file with column labels included ?
... data1 = ones(1001,4); data2 = ones(125,7); data = {data1,data2}; ... You have created a disparate-sized array of 125 ro...

6 years ago | 0

Answered
How do I position a label below a colorbar?
You're almost there... hCB=colorbar; hCB.Title.String='Title'; set(hCB.XLabel,{'String','Rotation','Position'},{'XLabel',0,[0...

6 years ago | 2

| accepted

Answered
xlsread import empty cell from excel file
Can't that way... xlsread imports what it finds as numeric and an empty cell is not numeric. You could use the multiple optiona...

6 years ago | 0

| accepted

Answered
How to shift scatter() to origin (0,0) on a plot with recorded data
'Pends on what "center" and "best" mean... :) Normally, I'd say just test=readmatrix('scatterdata.txt'); figure testmn=mean(...

6 years ago | 0

| accepted

Answered
"textscan" import leads to Undefined operator '.*' for input arguments of type 'cell'.
Use format spec that matches the file -- unfortunately, the file was created w/o using quoted string to delimit the date/time st...

6 years ago | 0

Answered
Parsing the data out based on categories encoded in a string
Well can get you mostly there although not sure exactly what you envision the final result to be from your description... tRes...

6 years ago | 0

| accepted

Answered
How to spread daily traffic over the week days?
Good start...looks like could probably simplify the plot routine some and I'd go ahead and create the other variables in the tab...

6 years ago | 0

Answered
How to delete/remove an extra yaxis (inserted by addaxis function), without removing the line that was created with the addaxis function.
I just realized about the three axes, not just two and the use of the FEX submission -- I don't have it and don't want to mess w...

6 years ago | 1

Answered
Polar plot points appear on wrong position
Looks like a bug -- I took the example for polarscatter from the doc and set rlim([10 20]) The one point outside the lower boun...

6 years ago | 1

Answered
How to delete/remove an extra yaxis (inserted by addaxis function), without removing the line that was created with the addaxis function.
The two blue and the two red axes have the same scale; there's no point in creating the extra ones; just plot both blue and both...

6 years ago | 1

| accepted

Answered
Why am I getting the error "Cannot find builtin function '_grayto16'"?
Try clear and then try again -- if you've inadvertentedly created a variable of same name this will get rid of it... If that do...

6 years ago | 0

| accepted

Answered
Failed to read xml error when using xmlread
... try DOMnode=xmlread(filename(i)); % try to read the file catch ME % catch the failure; f...

6 years ago | 0

Answered
How can i adjust the figure window size to display legend ?
hLg=legend({'\phi = 90^{o}','\phi = 90^{o}'},'Location','SouthOutside','Orientation','Horizontal');

6 years ago | 0

| accepted

Answered
Returning specific string from a given string that are found between two given substrings ?
input1=[0 0 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 ]; substring1=[0 ...

6 years ago | 0

| accepted

Answered
Error: Unable to perform assignment because the left and right sides have a different number of elements.
h(r+1)= (y(x+1)^2)*cos((2*k*pi*t)/l); Error here Above, t was defined as t = -a/2:a/(2-1); and a = K*M ==> 4. 6...

6 years ago | 0

Answered
Read hex strings from text file into struct
It's pretty quick to read and separate out the data by fid=fopen('data.txt'); s=textscan(fid,'%s','delimiter','\n','whitespace...

6 years ago | 1

| accepted

Answered
How to separate specific data from an array in a new file?
ia=ismember(data(:,1),[1:3]); writematrix(data(ix,:))

6 years ago | 0

| accepted

Answered
Plotting a graph through the points
plot(x,y,'*-','LineWidth',2); b1=polyfit(x,y,1); y1=polyval(b1,[x(1),x(end)]); hold on plot([x(1),x(end)],y1,'r:'); b2=poly...

6 years ago | 0

| accepted

Answered
finding peaks at specific indices/values
The actual bin frequency is unlikely to match the harmonics frequencies exactly (as in they won't match) so simply selecting the...

6 years ago | 0

| accepted

Answered
What data type is valid for piecewise functions?
syms x y = piecewise(x<0, -x, x>0, x); fplot(y,'r') axis([-10 10 -10 10])

6 years ago | 0

Answered
how to replace multiple values per second with their standard deviaton?
Read the doc more carefully... TT2=retime(TT,'secondly',@std)

6 years ago | 0

| accepted

Answered
I need to plot a Dynamic scattered plot. I have vector x and y, and those are coordinates. I need to plot coordinate 1, and then coordinate 2 but coordinate 1 must need to still there.
h = animatedline('Marker','none'); There's your problem... array=readmatrix('laser_data.csv'); % no point in a tab...

6 years ago | 0

| accepted

Load more