Respondida
Specify a format character vector in readtable
Ah! That's an internal problem in that |timerange| _calls_ |datetime|. Unfortunately, there's a quality of implementation pr...

más de 8 años hace | 1

| aceptada

Respondida
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
On a too-hot summer day I thought I might just try to answer some Q? that hadn't gotten responses...a sort on :unanswered by dat...

más de 8 años hace | 0

Respondida
Specifying legend information based on point plotted
% 'r' b' 'm' 'c' 'g' 'k' % color order lookup vector letter c=[[1 0 0]; [0 0 1]; [1 0 1];...

más de 8 años hace | 0

Respondida
Generating sets of non repeating random numbers
>> ix=reshape(randperm(40),10,[]) ix = 35 23 21 40 26 17 8 36 38 5 27 18 ...

más de 8 años hace | 2

| aceptada

Respondida
On multiple logical test failing in if statement
Apparently the issue was likely one of the cases wasn't actually _T_ or some similar misstep, but illustrates the difficulties i...

más de 8 años hace | 2

| aceptada

Respondida
How to find elements of an Array using indexes.
for i = 1:31 [Y, I] = min((latS-latG(i)).^2 + (lonS-lonG(i)).^2); disp(I) ...

más de 8 años hace | 0

| aceptada

Respondida
Extracting X Y values from a .txt file
You'll have to parse that file to locate the desired sections...none of the builtin reading tools are able to do such a file str...

más de 8 años hace | 0

Respondida
Specify a format character vector in readtable
It's not as trivial as the error message makes it seem, granted...there's only the named parameter _'Format'_ available as input...

más de 8 años hace | 0

Respondida
ploting a 2D matrix and adjusting axes
hAx=gca; % handle to the axes hAx.YDir='normal'; % set Y axis direction--imagesc uses 'reverse' Y See link...

más de 8 años hace | 0

Respondida
How to manipulate data between two numbers?
Any number of ways; a couple... z=interp1([min(x) max(x)],[0 1],x); b=polyfit([min(x) max(x)],[0 1],1); z=polyval(x...

más de 8 años hace | 0

| aceptada

Respondida
Create table from excel spreadsheet with multiple sheets
See doc readtable

más de 8 años hace | 0

Respondida
Performing count in column given a condition specified in a different column?
Use more straightforward builtin functions for tables/categorical variables... >> Y=[repmat({'MAY'},8,1);repmat({'DG'},5,1)...

más de 8 años hace | 0

| aceptada

Respondida
How can I use xlsread with changing indices?
x(j,:)=xlsread('filename',sprintf('A%d:A%d',i,i)); but I'd recommend against using it that way; |xlsread| opens and close...

más de 8 años hace | 0

| aceptada

Respondida
Replace NaN in table with a corresponding value in a different column
You need the logical addressing vector on both sides and address to return table to update the table... idx=isnan(A.A5); ...

más de 8 años hace | 0

Respondida
Matlab for loops output
In |Sig(:,i) = Steer_Vec;| you have the indices reversed relative to the way you sized the array --- *ERRATUM:* Bad eyes... ...

más de 8 años hace | 0

| aceptada

Respondida
Randomly return of a vector element. How to?
ixFix = N; % set the particular element however is to be done... iRet=[ixFix randperm(numel(A),1)]...

más de 8 años hace | 0

Respondida
Make an empty array stay the same size
As Walter says, you allocated an |int16| array but then trashed it by writing a |cellstr| to it; that change in type essentially...

más de 8 años hace | 0

Respondida
why the amplitude of fft is not the same as input signal?
See the extensive discussion previously at <https://www.mathworks.com/matlabcentral/answers/405924-hi-please-why-i-don-t-get-the...

más de 8 años hace | 1

Respondida
How to take the average of the columns of a matrix and insert into another matrix
fid=fopen('file.txt'); mn=[]; while ~feof(fid) n=fscanf(fid,'%d',1) if isempty(n),break,end d=cell2mat(te...

más de 8 años hace | 0

| aceptada

Respondida
Need help regarding axis labeling using datetick
>> dt=datetime(1991,1+[0:321].',1); % build a datetime vector to match the dataset >> whos dt ...

más de 8 años hace | 0

| aceptada

Respondida
Mat lab is only plotting one point for a linspace plot
You're missing the 'dot' in the "./" operator so ML is doing matrix division instead of element-wise...try L=1 - (t*(r.^k)...

más de 8 años hace | 0

Respondida
MATLAB Fouriertransform with nunequidistant values
The simplest route is to interpolate to a fixed sample rate and apply the FFT to that series. Alternatively there's a submiss...

más de 8 años hace | 0

Respondida
I need to map a binary array to 2 differnet values corresponding to 0 & 1
One of a zillion ways... C=complex(2*ones(size(A)),3*ones(size(A))); C(C==0) = 8-4i; Another less "deadahead" but one...

más de 8 años hace | 0

| aceptada

Respondida
How to fit multivariate pdf and cdf from data
They're in the _BinCounts_ property of the object or you can just use the old |histcounts2|. *ADDENDUM* Ah, ok. I've not ...

más de 8 años hace | 1

Respondida
vgg16 and vgg19 give this error: "Attempt to execute SCRIPT vgg16 as a function:"
You tried to assign a return value to a variable on the LHS of an expression -- scripts don't have return values; they operate i...

más de 8 años hace | 1

Respondida
Ignoring markers and lines in legend
... legendInfo{k} = ['Factor = ' num2str(k)]; legend(Plot2,legendInfo) legend(legendInfo) ... If you want only ...

más de 8 años hace | 2

| aceptada

Respondida
Boxplot help to get 4 plots into 1 graph of 5.
If you plot multiple |boxplot| into the same axis, they'll overlay each other for 1:N variables where N is the composite of numb...

más de 8 años hace | 0

Respondida
Use Logical indexing to replace the values in the matrix by its value divided by 2?
ixG7 = A>7; A(ixG7)=A(ixG7)/2; % presuming those are the numbers meant, of course.

más de 8 años hace | 0

| aceptada

Respondida
How can i shift a curve not just only in plot?
Just add as many zeros to the end of the array as you delete from the front or use y=circshift(h,-N); Probably the more ...

más de 8 años hace | 0

| aceptada

Respondida
Reading only certain columns from .csv file in matlab
It's far simpler to read the whole file into memory and then just cull the ones not wanted or keep those that are...and probably...

más de 8 años hace | 0

Cargar más