Respondida
hello everyone, I am using rectpuls function to generate a bandpass filter. I got a rectangle with a width at the top different from that at the bottom. anyone can help please!!
>> find(F1firsthalf,1) ans = 509 >> F1firsthalf(505:515) ans = 0 0 0 0 1 1 1 1 1 ...

más de 6 años hace | 0

| aceptada

Respondida
how to find solution for the error "Index exceeds the number of array elements (1)"?
"the f_pbest become 1*1 matrix which leads to this error. I dont know how the size of the matrix is changing." Because you told...

más de 6 años hace | 0

Respondida
How can I found character in a 2D array
The simplest way I can think to code would be is_existing=ismember(sort(Y,2),sort(X,2),'rows'); or is_existing=contains(strin...

más de 6 años hace | 1

| aceptada

Respondida
Sorting rows only with name of column
ttmp=[table(datetime(string(Datetime),'InputFormat','MM-dd-yy','PivotYear',1900)) array2table(Var)]; >> [~,ix]=sort(ttmp{:,2:...

más de 6 años hace | 0

Respondida
Understanding FFT Results from Excel Data
See <Answers/395585-normalize-fft-signal> It goes through a complete example including computing the associated frequency vecto...

más de 6 años hace | 1

| aceptada

Respondida
Obtaining the P values for the t stat
p = 1-tcdf(t,n-1) % Probability of larger t-statistic requires Statistics Toolbox...

más de 6 años hace | 1

| aceptada

Respondida
Plotting Points on Map with Longitude and Latitude
I don't have the Mapping TB so can't test, but looks like just hold on lat= 40.9394; lon=-100.151; plotm(lat,lon,'r*') wou...

más de 6 años hace | 1

| aceptada

Respondida
readtable and readtimetable can't load timezone properly?
What worked here for R2019b >> opt=detectImportOptions('thing.csv','delimiter',',') opt = DelimitedTextImportOptions with ...

más de 6 años hace | 0

| aceptada

Respondida
How to find peaks in a for loop where the number of peaks are not the same for every vector in matrix?
That's when cell arrays are useful... for i=1:size(CH1WaveForm_1,2) [pks{i},locs{i}]=findpeaks(CH1WaveForm_1(1:end,i)); en...

más de 6 años hace | 2

| aceptada

Respondida
Printing the values on the .csv file
In your program you'll have to create a table of the names/categories and the breakpoints that is associated with them and then ...

más de 6 años hace | 0

Respondida
Find Time when two conditions are met in two colomns
Really don't need the applied signal at all to answer the Q?... data=load('Data1.txt'); [Imx,iImx]=max(data(:,3)); ...

más de 6 años hace | 0

| aceptada

Respondida
Use string or character arrays in code?
It's all about what's more convenient for the purpose...char() is most memory efficient, but one has to always drag around and r...

más de 6 años hace | 0

Respondida
Count number of values within a range in matrix per column and assign count to new matrix
>> reshape(cell2mat(arrayfun(@(c) histcounts(A(:,c),[0 0.5 1]),1:size(A,2),'UniformOutput',false)),[],size(A,2)) ans = ...

más de 6 años hace | 0

Respondida
How can I analyse particular portions of an array to use for plotting? Considering dataset of ~1.5 million rows for each variable and ~150,000 locations with 10 values (for each variable) per location
"I’ve imported the data from a table and converted each variable into their own individual arrays,..." That's exactly the wrong...

más de 6 años hace | 0

Respondida
select complex numbers from cell array based on the real part
Well, if you want the max() of the real part, then you'll have to limit to only looking at the real part -- max() for complex re...

más de 6 años hace | 0

| aceptada

Respondida
Put a cell into a title in plot
Sr=regexp(fileread('data.txt'), '\r?\n', 'split') .'; % reads as a string, not numeric for i=1:size(St); ...

más de 6 años hace | 0

Respondida
How to sort a two column vector
s=sortrows(x);

más de 6 años hace | 1

Respondida
Avoid +0 when using fprintf %+d
Not w/o some code logic of one form or the other, no. There is no "magic bullet" format descriptor that behaves as desired; as ...

más de 6 años hace | 2

| aceptada

Respondida
How to convert the output of this coding to txt file formate using Matlab?
ix1 = (Xs1-x2).^2+(Ys1-y2).^2+(Zs1-z2).^2 < R2^2; scatter3(Xs1(~ix1),Ys1(~ix1),Zs1(~ix1),20,'r','h','filled','MarkerFaceColor',...

más de 6 años hace | 1

| aceptada

Respondida
proportion of gender having health issue
Some other things to explore... hScore=randi(100,100,1)/4; % An artificial dataset... ...

más de 6 años hace | 2

Respondida
Is there a way to change the range function of xlsread based on a variable input?
Sure (altho it's probably as fast and less hassle to just read read the whole spreadsheet and then just select the results wante...

más de 6 años hace | 0

Respondida
How can one show variable values in legend of a plot?
Just build the desired string array -- num2str works nicely here alto you have to ensure the values are in a column vector to av...

más de 6 años hace | 2

| aceptada

Respondida
Syntax: var<1d-4
dp=max(max(abs(phi1a-phi1))); if(~(dp>0) & ~(dp<0) ) disp('NaN'); return; end if(dp<1d-4) break; end % THIS LINE could be wr...

más de 6 años hace | 3

| aceptada

Respondida
How do I make a variable that is equal to the position of a row in a table by using the name of that row?
fieldnames is specically documented for struct or Java or COM objects at least thru R2019b; I wasn't aware it would return the ...

más de 6 años hace | 0

| aceptada

Pregunta


Yet Another Excel COM Problem -- SAVEAS
Have a whole bunch of older Excel files that must process -- and for going forward would like to convert them to the current def...

más de 6 años hace | 1 respuesta | 0

1

respuesta

Respondida
Error for reading function
You certainly do throw the parentheses around... :) sumenergy2= ((delta_H_T_ref)+ ((delta_Cp)*((T_isoth)-(T_ref))); ...

más de 6 años hace | 0

Respondida
graph axes and its scaling
If you haven't, turn your time vector into datetime (if it is actual calendar time) or a duration (if it is elapsed time from so...

más de 6 años hace | 0

Respondida
How do I detect a "tab" character in a line of text read by fgetl?
l=fgetl(fid); istab=(l==9); % the fast way... % istab=strfind(l,char(9)); % the char() string stri...

más de 6 años hace | 1

| aceptada

Respondida
Modifying Figure Y-Axis Exponent Parameter After YTickLabels are Modified
Don't use manual labels on ticks, just don't put ticks at the unwanted places. When write labels, the EponentMode is set to 'Ma...

más de 6 años hace | 0

| aceptada

Respondida
About the usage of for, while and return
With the clarification that operations are the same, then data=xlsread('data.xlsx','B1:B86640'); % preliminaries -- define sto...

más de 6 años hace | 0

| aceptada

Cargar más