回答済み
Surfl chart; datetime on y-axis, letters on x-axis
Be simpler if you'd attach a subset of the data itself but you've got to give the _X_, _Y_ axes values to plot against to get da...

9年以上 前 | 0

回答済み
Read a txt file
Use _|'headerlines'|_ named parameter in |*textscan*| is probably the simplest; a loop and |*fgetl*| also works well albeit a li...

9年以上 前 | 0

| 採用済み

回答済み
if statement different answer when input variable vs number
See the FAQ <http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F Why is 0.3-0.2-0.1 no...

9年以上 前 | 1

| 採用済み

回答済み
Using Datenum to convert YYYY MM DD HH
dNum = datenum([nineteen_49(:,1:4) zeros(length(nineteen_49),2)]); You missed the second argument to *zeros* in your augmen...

9年以上 前 | 0

| 採用済み

回答済み
coloring by third variable
Sure, just use a set of RGB triplets for the color vector instead of the values. Each row of the matrix specifies an RGB triple...

9年以上 前 | 0

回答済み
Formatting a single row of data into multiple rows
Data = cell2mat(textscan( fid, '%d', 'delimiter', ';')); % convert to array from cell N=10; ...

9年以上 前 | 0

回答済み
When export date/time to excel, change the time(mm:ss)..
What's wrong is the confusing nature of what the 'Format' property actually does with |*datetime*| variables; it only affects th...

9年以上 前 | 0

回答済み
Speeding up search by value in a large vector.
Well, don't know if it's any faster or not but you can try nwset=nwset(nwset(:,1)==prev_idx(i),2); to eliminate the inte...

9年以上 前 | 0

回答済み
How to delete rows that contain NaN in a table
If the table uses default missing values for the various types (see documentation for the various types; NaN is for numeric) the...

9年以上 前 | 3

| 採用済み

回答済み
fprintf cell array with strings and numbers
... fmt=[repmat('%f,',1,cols1{kk}-1) '%s\n']; % format presuming last is string for i=1:rowsC{kk} fprintf(B{kk},fm...

9年以上 前 | 0

回答済み
Interpolation by pressure using interp1
Rough outline to get you started... >> S=categorical(cellstr([repmat('B',3,1); repmat('C',5,1)])) % made up a few extras.....

9年以上 前 | 0

| 採用済み

回答済み
Store data into new variable based on condition
Matlab Tutorial (not your problem, but worth noting in general) A=max(size(dataset)); --> length(dataset) which will on...

9年以上 前 | 0

| 採用済み

回答済み
Write vectors of different size in text file
data = [Angle Velocity Distance Acceleration]'; ... where not all vectors are of same length. Doesn't seem to make mu...

9年以上 前 | 3

| 採用済み

回答済み
Is there any other way to code (|n1| |n2|) in matlab..? i couldnot code this single vertical bars ..? it is very simple to look my question but am stuck here.. if i come to know this i will solve my problem...
doc abs Matlab uses | as a logical operator, not in pairs to indicate absolute value (which practice is consonant with virt...

9年以上 前 | 2

| 採用済み

回答済み
Saving .txt file in .mat file
Sure, you can store multiple variables in a single .mat file; just read the .txt file into a cellstr array variable and write bo...

9年以上 前 | 0

回答済み
sortrows not working with logical column
The doc at the link is addressing an _*array*_ input which array can be one of the various types listed. It isn't describing a ...

9年以上 前 | 1

| 採用済み

回答済み
why the answer is not showing any matrix after applying IF condition?
_"... I cannot find any cell named allCells_array"_ X=sum(Z,2); % will be column vector of sums if all(X>=2) % will be ...

9年以上 前 | 1

回答済み
Comparing two arrays of different lenght and extracting the ones in common
[~,~,ixzy]=intersect(XY,XYZ(:,1:2),'rows'); xzy=XYZ(ixyz,:); if the values are commensurate in that the XY points must b...

9年以上 前 | 0

| 採用済み

回答済み
plotting with a rectangle
I'd approach it by using the COG and rotation as computed by the simulation and then a transformation from that to the location ...

9年以上 前 | 0

| 採用済み

回答済み
How to find input data that best matches given output data
# f=[freq(1):100000:freq(end)].'; % if want fixed df between ranges use colon instead of linspace # ix=interp1(f1,1:length(f1)...

9年以上 前 | 0

| 採用済み

回答済み
I need more decimal digits than the default for the values of x ...
>> x=(0); for i=1:10; fx=exp(pi*x(i))/3 -1; fxx=pi*exp(pi*x(i))/3; fxxx=pi*pi*exp(pi*x(i))/3; ...

9年以上 前 | 1

回答済み
How to change the fontname of axes labels when using the latex interpreter
Well, when you change to the LaTeX interpreter from TeX then (as you've learned) _fontname_ and all the similar properties are n...

9年以上 前 | 3

| 採用済み

回答済み
Is it ok to have rounding errors when rounding to integers?
Does appear to be a "quality of implementation" issue. Hadn't ever used it w/ the negative optional argument but looks like doe...

9年以上 前 | 0

| 採用済み

回答済み
How can I automatically import different variables from txt files and split them in different matrixes?
Yeah, but I'd strongly recommend _against_ using so many variables in lieu of either just a NxM array or a table. When folks st...

9年以上 前 | 0

回答済み
How do we eliminated (empty or zeros) Columns or Rows from tables in Matlab
To eliminate columns fully containing NaN in table _t_, use t(:,all(ismissing(t)))=[]; Similar logic for zero values; be...

9年以上 前 | 2

| 採用済み

回答済み
How do we replacing empty or (NaN) cells with 0's in Matlab?
doc isnan doc isempty doc all Look for "logical addressing"

9年以上 前 | 0

回答済み
What does this error mean? (lsqcurvefit)
I'd venture it got into a negative parameter region and hence got an imaginary value from a square root that was trapped by the ...

9年以上 前 | 0

| 採用済み

回答済み
Dynamic Variable with Two Values Inside a While Loop
Don't see that you need any loop at all. Simply populate a _nJobMax_ by _nMachines_ array with the appropriate start time value...

9年以上 前 | 0

回答済み
Evaluate user input expression
>> a=1:3; >> v=input('Enter Matlab vector expression for a: ') Enter Matlab vector expression for a: a.^2 v = 1 ...

9年以上 前 | 0

回答済み
textscan incompatible with sscanf numeric field width for seemingly complex-valued numbers
Looks like another bug to me where *textscan* doesn't follow the rules. I'd submit it as one; im(ns)ho one should _*always*_ ex...

9年以上 前 | 0

さらに読み込む