回答済み
How do I select several rows in Excel?
I'll throw the last example code out as an Answer as well as Comment just for visibility -- and it may turn out useful for other...

4年以上 前 | 2

回答済み
How do I select several rows in Excel?
You can use any valid range expression to address any range you can code the logic to compute addresses of. You must then use e...

4年以上 前 | 1

| 採用済み

回答済み
Save a matrix .mat in a specific folder with a variable name
save(filepath,'variablename') The functional form of save needs the file name to be the variable containing the (hopefully full...

4年以上 前 | 0

回答済み
is there any way to pause the code if there exist an imaginary variable?
While I've not tried it, the following should work if you can arrange the conditions needed. The first one may be the kicker in...

4年以上 前 | 1

回答済み
Adding text programmatically to a figure
text() is exclusively a child of an axes, not a figure. To write text outside the boundaries of an axis, use the annotation obj...

4年以上 前 | 0

回答済み
How to scan directories and find a specific file in each folder and their respective subfolders
Of course. However, with base MATLAB syntax you have to traverse the folder tree manually/explicitly in code; there are a numbe...

4年以上 前 | 0

| 採用済み

回答済み
Adding latex equation to a Matlab Live Script and Plot the equation
LaTeX is simply a display feature, at least so far it isn't tied to the actual code...

4年以上 前 | 0

回答済み
enumeration Fails with get(), set() arguments
OK, I (finally!) figured out how to code the above to use a named constant with external interface -- don't use MATLAB enumerati...

4年以上 前 | 0

回答済み
How to lookup and return a corresponding value from table?
I'd start by turning 'obs' into a categorical variable... cmnt0 = categorical({'obs1';'obs2';'obs3';'obs4'}); curve=[1;2;3;2];...

4年以上 前 | 0

回答済み
I like to save a cell array into text file
>> c={'Al','Mg';'Na','K'} c = 2×2 cell array {'Al'} {'Mg'} {'Na'} {'K' } >> join(c,'') ans = 2×1 cell a...

4年以上 前 | 0

| 採用済み

回答済み
How to Interpolate scalar on new grid
Error using griddedInterpolant Sample points must be unique. comes from x = Results(:,1); y = Results(:,2); ... [X,Y]=mesh...

4年以上 前 | 0

回答済み
How to save this matrix?
If there's just one array/matrix M, then fid=fopen('test.txt','w'); fmt=[repmat('%.4f',1,size(M,2)) '\n']; % build ...

4年以上 前 | 1

| 採用済み

回答済み
how can i get data sampling rate and FFT bin width?
"What is the default value of the parameters fft?" None...the fft doesn't care, the sample rate is set solely by the data colle...

4年以上 前 | 0

回答済み
How to plot an array with an hourly time stamp without starting at 00:00:00?
You can build complete datetime variables from the input by something like-- dt1=datetime("yesterday")+duration(T(1)); % ...

4年以上 前 | 1

| 採用済み

回答済み
How can I convert file txt into matrix?
Simply put, you can't. An array of anything (even a cell array) has to be regular (your cell array above is Nx1; it is only the...

4年以上 前 | 0

回答済み
Box plot with categorical axis - without LaTex interpreter
Much easier now... :) optFV=detectImportOptions('fruitvegprices.csv') % lets you then set the input...

4年以上 前 | 0

| 採用済み

回答済み
calculate kurtosis in matlab and minitab but not same answer
Looks like Minitab uses the bias-corrected estimator with the "-3" convention applied -- K>> kurtosis(x(:,2),0) ans = ...

4年以上 前 | 0

回答済み
sorting data tables according to results from cluster analysis
Y=X(outperm,:); % presuming X is the variable guessing from the initial code...

4年以上 前 | 1

| 採用済み

回答済み
sort the matrix X, then sort the another matrix in the same order as X
Matrix expansion of subscripts gets you here... Q=cell2mat(arrayfun(@(i) P(i,indx(i,:)),[1:size(P,1)].','UniformOutput',false))...

4年以上 前 | 0

| 採用済み

回答済み
How can I plot a circle over an interval (range of values)
hL=plot([-1327,0],[0 0],'LineWidth',8,'Color',[1 1 1]*0.5); xlim([-1500 200]); ylim([-20 20]) xticks([]),yticks([]) hold on ...

4年以上 前 | 0

| 採用済み

回答済み
How to choose values from vector (150 000x1). When i need first 512 values for x, next 512 values for y and next 512 values for z. And separate vector by this style to the end
XYZ=reshape(V,512,[]); then process by column. Most MATLAB functions operate by column natively; depending upon what you're do...

4年以上 前 | 0

回答済み
R2017b Compatibility
https://www.mathworks.com/support/requirements/matlab-system-requirements.html?s_tid=srchtitle_MAC%20Monterey_6 indicates R2021b...

4年以上 前 | 0

回答済み
How do I get my graphs to converge on one ?
... [yob,t,xob] = lsim(syst,r,t,[x0 x0ob]); figure(2); hold on plot(t,xob(:,1)/max(xob(:,1)),'r'); plot(t,xob(:,2)/abs(min(...

4年以上 前 | 0

回答済み
select folder that also includes subfolders
There is no builtin gui tool that does more than multi-select on files within a single folder; you have to traverse the director...

4年以上 前 | 0

質問


Compiler Preprocessor Stringizing to Add Quotes
OK, carrying on w/ the idea of linking w/ GFORTRAN, I started with one function to see if could build the C binding. It works t...

4年以上 前 | 0 件の回答 | 0

0

回答

回答済み
Using find for table values
Rik's second comment is the pertinent one here -- you're appying the function to the entire table, not a variable within the tab...

4年以上 前 | 0

回答済み
How to apply two masks simultaniously for plot
ixBoth=mask2&mask1; plot(x(ixBoth), y(ixBoth, 'g.') Not the place for && short-circuit operator, but the single & for logical ...

4年以上 前 | 0

| 採用済み

回答済み
Converting Intrinsic MATLAB Functions ones(), zeros(), sparse(), diag() to FORTRAN
program testit implicit none real(kind=kind(0.0d0)), allocatable :: A(:,:) integer :: i, j A = zeros(6,4) print...

4年以上 前 | 2

| 採用済み

回答済み
What frustrates you about MATLAB? #2
While I'm now long retired from active consulting where it was a key element, even then the "red-haired stepchild" status of For...

4年以上 前 | 0

回答済み
Storing For Loop Data For Future Use In A 3D Plot
What you're written seems like awfully peculiar manipulations to perform on the variables, but V=[1:rowsize].'; ...

4年以上 前 | 1

さらに読み込む