Réponse apportée
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(...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
"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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 1

Réponse apportée
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...

presque 6 ans il y a | 1

Réponse apportée
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...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

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

presque 6 ans il y a | 0

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

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 1

| A accepté

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

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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])

presque 6 ans il y a | 0

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

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How to search for header name and only pull that column as an array you can multiply
If you loaded the .csv into a table with headers that are variable names, you don't need to search nor "pull" data -- just refer...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Plotting a figure with bars in stack
Any number of ways; a braind-dead sample y=sort(rand(20,2),1,'ascend'); % some dummy y data figure,hold on ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Particularly strange bug using the eval function
From the doc-- Whenever possible, do not include output arguments within the input to the eval function, such as eval(['outpu...

presque 6 ans il y a | 2

Réponse apportée
How do I erase string duplicates in one column of a cell array and add the strings' corresponding numbers in the second column?
>> c c = 6×2 cell array {'Sarah' } {[12]} {'Marie' } {[ 3]} {'Sam' } {[ 5]} {'Rose' } {[ ...

presque 6 ans il y a | 1

Réponse apportée
Why do my FFTs look wildly different?
Above just based on the figures; reading the m file reveals a major problem -- you only processed the first N = 1024 points of ...

presque 6 ans il y a | 0

Réponse apportée
Error: File: t2_m1.m Line: 46 Column: 8 The input character is not valid in MATLAB statements or expressions.
Unrecognized function or variable 'material_1'. >> material_1=rand(10,120); >> x = (2:2:120); c_1 = material_1(:, x); vf_1 ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Plotting several .txt files
... fullFileName = fullfile(theFiles(k).folder, baseFileName); fprintf(1, 'Now reading %s\n', fullFileName); plot(fullFileNam...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Matrix addition in a loop in a random column
Must reference the same size section of array on LHS of an assignment as the RHS unless assign the entire LHS variable to RHS. ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Carry trade portfolio with 20 countries
That was kinda' fun!!! :) % create some sample data...use a table for convenience tPort=[ table(datetime(1997,0:20,1,'For...

presque 6 ans il y a | 0

Réponse apportée
Creating a built in function?
Don't put it on the Desktop, create a folder in your user area for MATLAB and then add that folder to the MATLABPATH and make pe...

presque 6 ans il y a | 1

| A accepté

Réponse apportée
How do you get multiple minimum values in a column based on grouping and then isolate the corresponding rows for the whole table?
[g,ig]=findgroups(data.names); b=splitapply(@(x) {maxk(x,10)},data.age,g); b contains the k oldest elements for each group...y...

presque 6 ans il y a | 0

| A accepté

Charger plus