Réponse apportée
fplot command what is the default resolution ?
clear x f=@(x) 3*exp(-x).*sin(x); fplot(f,[0 8],'b') will produce the same plot -- fplot doesn't use your x array at all; it ...

plus de 7 ans il y a | 0

Réponse apportée
How to fix the ticklabels - time series analysis?
Clearly, the ticklabels you wrote are (1:5000)/20. The first label is 0.05 --> 1/20, the second 0.10 --> 2/20, etc., etc., ......

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How can i plot raw eeg data
You have to load the library first...see the example code in the documenation for checking...use your wanted library name, path ...

plus de 7 ans il y a | 0

Réponse apportée
How to extract the data lines from a large text file which contains combined numeric lines and text lines
Basic outline is as follows... fid=fopen('OneLineData.dat'); data=[]; l=fgetl(fid); while ~feof(fid) if contains(l,'SOFM ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to read mixed delimited data from a text file?
If the file is tab-delimited, the spaces won't matter... data=dlmread(fullfile('yourdirectory','yourfile.txt'),'\t'); % read t...

plus de 7 ans il y a | 0

Réponse apportée
How can I erase Sheet1 Sheet2 and Sheet3 in excel file using writetable function in matlab?
Modifying workbook properties isn't what writetable does--it just writes to a given sheet, creating one of that name if it doesn...

plus de 7 ans il y a | 0

Réponse apportée
am trying to find the first and second derivates of a set of data points I've imported
That's essentially trivial file that data=csvread('data_10.csv'); data(:,2)=[nan;diff(data(:,1))]; % first difference...

plus de 7 ans il y a | 0

Réponse apportée
Difference between readmatrix() and readtable()
It appears readmatrix is limited to returning one type of data in the output array as the 'OutputType' named parameter is limite...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
Function handle not rechecking if statement
tf_f = @(T,Y) isempty(p_f(T,Y)); if tf_f(T,Y) == 1 && bottom_f(Y) > p21top_f(T) elseif tf_f(T,Y) == 1 && top_f(Y) < p21top_f(...

plus de 7 ans il y a | 0

Réponse apportée
limits are too large
K>> format short K>> sum(X(:)>1E100)/numel(X) ans = 0.8499 K>> sum(X(:)>1E200)/numel(X) ans = 0.7848 K>> sum(X(:)...

plus de 7 ans il y a | 0

Question


regexrep for the neophyte
How to write expression to find and convert financial strings written with comma separator to be able to parse numerically? Exa...

plus de 7 ans il y a | 1 réponse | 0

1

réponse

Question


Brain freeze re: grouping and recombination
Have two files of correlated data via a categorical variable -- in the first, the name field has been normalized such that can f...

plus de 7 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
while/for loop
"know i have to use a for or while loop..." Not with Matlab, no! Use Logical indexing (link) as illustrated...

plus de 7 ans il y a | 0

Réponse apportée
Reading a csv file
You started off well w/ the readtable route...but, once you've got the table, then use the variables there, don't create new one...

plus de 7 ans il y a | 1

Réponse apportée
computing second derivative from txt/csv file based on existing excel algorithm
Here's perfect example why Matlab excels over Excel... :) txyz=importdata('B0264_dollyo_air_P_T01 rtoe.txt',',',8); % read the...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How can I save a word e.g. 'apple' in a text file, without matlab separating every letter with a comma?
You undoubtedly use csvwrite or similar to write a character array -- internally a char() array is just that--an array of number...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
how to add a matrix element in a fzero function
As you wrote it, the function is the literal text including the argument so nothing ever gets substituted for dynamically--one w...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to find intersection point of two curves, when the intersection point is not there in data sets?
Both intersection sections appear to be straight lines; fit them and use fzero to find the point bblue=polyfit(xblue,yblue,1); ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Polynomial 2nd degree
Higher order polynomials aren't going to help here...the following code generated the figure: for i=3:9 subplot(4,2,i-2); ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
code for computing the formular
fnP=@(a,i) (sum(a(i)>a(1:i))+0.5*sum(a(i)==a(1:i)))/i; >> for i=2:numel(Si),fnP(Si,i),end ans = 0.75 ans = ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to change values of x axis from numbers to dates
x = -10:0.1:10; y = sin(x); hF=figure; % keep handle to figure plot(x,y) hAx(1)=gca; ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Correlating Two Arrays Using Correcoef
There's at least one NaN in the second variable...you don't give any information about which is which. >> spd=5*rand(500,1);tlt...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Polynomial 2nd degree
Taking a shot that the presumption earlier is the correct one-- xy=xlsread('ML.xlsx','sheet2'); % read the data into array ...

plus de 7 ans il y a | 0

Réponse apportée
Writing first and last line of each cell
Just have to handle the special case outside the loop... xx=zeros(length(xxMM)+1,6); xx(1,:)=xxMM{1,:}(1,:); for i=1:length(x...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Plotting graph of negative values of array in integral2 with 3 variables
The functional is invariant upon the the loop; remove the definition from inside the loop Use meaningful name for the degrees a...

plus de 7 ans il y a | 1

Réponse apportée
Finding pythagoras triples when only c is known
Somewhat more rudimentary would be UP=fix(sqrt(Csq-1)); % can't be bigger ignoring degenerate case of (sqrt(Csq^2),0) for i=1:...

plus de 7 ans il y a | 1

Réponse apportée
Plot A Graph With Asymptotic Behavior
ymaxCX = max(max(CX), limCSss); yminCX = min(min(CX), limCSss); Just getting an overall min/max value of the data in vector C...

plus de 7 ans il y a | 0

Réponse apportée
I need to classify my result in catagories
N=1.5*ones(size(ma)); N(abs(ma)==45 | abs(ma)==135)=-0.5; ... The rest should be self-evident from the above; lett as "exerci...

plus de 7 ans il y a | 0

Réponse apportée
Getting the correct y-intercept and gradient for a trend line using 'fit'
Looks quite right to me...the intercept is where the fitted line will cross (intercept) the y-axis at x=0...that point is way an...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to add a column to an existing file?
Text sequential files are, well, "sequential" You can't just add in the middle by either column or line/record. data=importdat...

plus de 7 ans il y a | 2

Charger plus