Réponse apportée
Normalization of Power Spectral Density
It's to make the output amplitude consistent regardless of the frequency resolution of the measurement. See https://community.s...

plus de 5 ans il y a | 4

| A accepté

Réponse apportée
How can I correctly use the parenthesis and write equations
Pd=Pc*((1+(k-1)/2*ac^2*Vpr^2)^(k/(K-1))-1); Which inputs might be vectors, if any, would determine where and if need dot operat...

plus de 5 ans il y a | 0

Réponse apportée
How do I make a histogram using value - count pairs?
histogram('categories',categorical(M(:,1)),'bincounts',M(:,2)) to match the number of elements in x,y. Otherwise, have to ...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Changing the name of the sheet in excel during a loop for
Each workbook just has one sheet that is to be named with the trailing sequence of the filename? That should be pretty simple, ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Matlab strcmp Error - help
The biggest problem is you're trying to deal with numeric data as string -- convert to numeric. This, unfortunately, isn't hand...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How do I calculate the mean of only positive values
mean(X(X>0)) % global mean or arrayfun(@(i) mean(X(X(:,i)>0,i)),1:size(X,2)) % column means depending upon which mean...

plus de 5 ans il y a | 0

Réponse apportée
i want to use goto to jump from third line to eighth line.
if (i==4)|((dx/yg(i))<tand(sia)) X else P(i-1)=0 end or if (i~=4)&((dx/yg(i))>=tand(sia)) P(i-1)=0 else X end

plus de 5 ans il y a | 0

Réponse apportée
Linear model fit error
x1 = [7 8 7 8 7 8 7 8 7 8 7 8 7 8 7 8 6.5 8.5 7.5 7.5 7.5 7.5 7.5 7.5 7.5 7.5 7.5].'; x2 = [12 12 12 12 12 12 12 12 20 20 20 20...

plus de 5 ans il y a | 0

Réponse apportée
I am getting error "Conversion to cell from uint8 is not possible." Can anyone please help in debugging this? Thank you for your time.
segmented_images=cell(1,3); did indeed define to be a cell array, but then you wrote segmented_images(k)=colors; segmented_im...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
When using listdlg to create a menu, how do you access the user input?
>> cList = {'United Kingdom','Bulgaria','Germany','Greece','Sweden','Netherlands','Spain','Romania','Luxembourg','Poland'}; [in...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Edit a column in a dat file with some header lines and a table
A) goes something like nHeaders=11; % or whatever fidi=fopen(filenameIn,'r'); fido=fopen(filenameOut,'w'); for i=1:nHeaders...

plus de 5 ans il y a | 1

Réponse apportée
How to transfer data from a messy .rpt file to an array
>> data=textread('output.rpt','%s','delimiter','\n','headerlines',5) data = 14×1 cell array {'CASE = ""' ...

plus de 5 ans il y a | 1

Réponse apportée
Error when fitting polyfit curve
Error is exactly what it says--you wrote: X = categorical({'March','April','May','June','July','August','November'}); M = reor...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Export a Char String to Excel
The example doesn't work as is, exactly... >> res = ['Carreau-Parameter: ';'a = 7521.1446 Pa*s ';'b = 0.10637 s ';'c = 0.7...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to convert a vector to a string (Matlab2016a)
For what definition of "string"? >> A=1:3; >> num2str(A) ans = '1 2 3' >> num2str(A.') ans = 3×1 char array ...

plus de 5 ans il y a | 0

Réponse apportée
Continue Long Statements on Multiple Lines
ix=find(~contains(txt,'Sys')); >> arrayfun(@(ix) join(txt(ix-1:ix),1),ix) ans = 2×1 cell array {'Sys_7899 1=0.21 2=...

plus de 5 ans il y a | 0

Réponse apportée
Mean of mutiple variables
d=dir('data*.mat'); % or similar list. Name files so can use appropriate wildcard expression total=0; for i=1:numel(d) ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to use fillmissing function within a group ?
>> varfun(@(x) fillmissing(x,'previous'),T,'groupingvariables',{'ID'},'InputVariables',{'amount1','amount2'}) ans = 6×4 tabl...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Index exceeds the number of array elements (Very odd case)
Well, yes, that can happen but it won't necessarily always, depending upon what the data are in the two arrays. ... [SOCu, ind...

plus de 5 ans il y a | 1

Réponse apportée
Plot 2 vectors (different size) on same histogram normalized such that both have total area 1
Use 'Normalization','pdf' instead.

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to find X value of given Y close to zero ?
[~,ix]=min(abs(m),[],'all','linear'); [~,j]=ind2sub(size(m),ix); >> o(j) ans = 340 >>

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
export txt with text and numers
Does seem as though TMW has ignored such in terms of prepared functions; probably because there is no limit to the possibliliti...

plus de 5 ans il y a | 0

Réponse apportée
How to add values in matrix if in a conditions is met?
>> accumarray(findgroups(data(:,1)),data(:,2)) ans = 3.5000 1.5000 4.8000 2.5000 5.4000 2.8000 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to create extra data based on a string cell value?
Read the data into a table instead is probably quite a lot easier. Then use grouping variables to operate over data by whatever...

plus de 5 ans il y a | 0

Réponse apportée
readMatrix/for loop issue
MATLAB is case sensitive--the function is readmatrix, not readMatrix

plus de 5 ans il y a | 0

Réponse apportée
How do I use use sprtintf for a loop?
Probably the most-asked question of all...don't build the names, use dir d=dir('Monday*.csv'); % better to use fully-qual...

plus de 5 ans il y a | 0

Réponse apportée
How can I exclude specific data points from a data file?
Just select the data want (or conversely, remove what don't want)... Fout=1000; ZLim=2.5E6; isOut=(rawData(:,1)==Fout) & (raw...

plus de 5 ans il y a | 0

Réponse apportée
Difference between two successive elements in a matrix
D=diff(A(:,2)); ix=find(D>5)+1;

plus de 5 ans il y a | 1

Réponse apportée
How to plot two lines with different scales in MATLAB?
So what, specifically did you try and what didn't work? Seems straightforward... t=readtable('t.csv'); plot(t.Date,t.IP) yla...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to find is between values for 1min datetime delta
>> tlower.Format='Default'; >> tupper.Format='Default'; >> [tlower tupper] ans = 1×2 datetime array 01-Jan-2020 15:18...

plus de 5 ans il y a | 0

| A accepté

Charger plus