回答済み
What is the most efficient code for calculating a signal based on voltage time history and a calibration curve.
Use the vectorized form for *interp1* vOut=interp1(vc,yc,v,'cubic'); A comparison showed almost no difference between us...

10年以上 前 | 0

| 採用済み

回答済み
Linkaxes not working, what can i use?
hAx=zeros(4,1); for i=1:4,hAx(i)=subplot(4,1,i);end linkaxes(hAx) ylim(hAx(2),[0 10]) seems to work just fine here...

10年以上 前 | 1

回答済み
Several Operations Within a Matrix Matlab
Doesn't look to me like the result is really dependent upon the third column at all; it's simply accumulating the like values in...

10年以上 前 | 0

回答済み
using ismember function column by column
Presuming the lists are sorted and to be used concurrently as described, keep an auxiliary counter to "walk" through them... ...

10年以上 前 | 0

| 採用済み

回答済み
How to extract a page from a 3d array and add it to a 2d array in a for loop?
Firstly, the indices vector _e_ and subsequently _S_ can be built from L=4; for i=1:2:c-(L-1) e=i:i+L-1; ... ...

10年以上 前 | 0

回答済み
How can I get the diagonal elements of a matrix to be 0's
x=~eye(N);

10年以上 前 | 0

回答済み
help me using dlmread
The problem is the ',' in the fields; is it intended to be a decimal point or a thousands separator? Either way, you've got to ...

10年以上 前 | 1

回答済み
How can I integrate an equation with using trapezoidal rule?
This pretty clearly would be a homework type problem, so a) what have you tried so far, and b) what part of doc trapz % see...

10年以上 前 | 0

回答済み
Find sum of matrices, of different sizes, in a cell
s=sum(cellfun(@sum,C)); *ADDENDUM* For more than 1D cells, *sum* returns sums by column instead of single total sum. Use ...

10年以上 前 | 1

回答済み
How can I create a plot with quaterly dates on the x-axis ?
dn=datenum(1973,1+[0:3:12*(2013-1973)].',1); % make a sample time vector [datestr(dn(1)) '<->' datestr(dn(end))] % s...

10年以上 前 | 0

| 採用済み

回答済み
Read Multiple lines of Mixed Data from DAT file
Sequential files are, well, "sequential". There's not a way to read them as random-access; best one can do(*) is to read record...

10年以上 前 | 0

回答済み
how to output logical arrays in each cell element of the cell array using ismember function???
Use *cellfun* to apply functions to each cell or comparably-sized cell arrays-- >> cellfun(@ismember,A,B,'uni',0) ans = ...

10年以上 前 | 0

| 採用済み

回答済み
Matrix A to B
>> [i j]=ind2sub(size(A),find(iswithin(A,1,100))); >> [i j] ans = 1 3 1 4 2 4 1 5 ...

10年以上 前 | 1

| 採用済み

回答済み
help me with dots location
Everywhere there's an arithmetic operator (other than *+* or *-* which are born doing the right thing :) ) replace the operator ...

10年以上 前 | 1

回答済み
Remove Decimal part from number
doc mod >> mod(9588,256) ans = 116 >>

10年以上 前 | 1

| 採用済み

回答済み
reading a text file by correct date format
OK, as I suspected, the file format is _NOT_ tab delimited but fixed-width columns _except_ the records aren't the same length; ...

10年以上 前 | 0

| 採用済み

回答済み
how to use if when there is NAN
Yeah, compute the means first and then do the comparison over the valid regions. You can augment sizes later however you so cho...

10年以上 前 | 0

回答済み
How to plot a line graph with algebraic function
Try ezplot('-3.546*x^4 + 40.652*x^3 - 172.24*x^2 + 320.58*x - 221.62') % let if default ezplot('-3.546*x^4 + 40.652*x^3...

10年以上 前 | 0

回答済み
How to reference multiple matrices in cell arrays using a colon or other special characters rather than a loop?
That's what *cellfun* is for... >> a={rand(2)}; a(2)=a(1); % a simple test >> b=a; >> cellfun(@rdivide,a,b,'uni',0) a...

10年以上 前 | 0

| 採用済み

回答済み
how to create 2D polynomial regression?
If have CurveFitting Toolbox, sf = fit([x, y], z, 'poly22'); % doc fit for details... If not, write the specific model ...

10年以上 前 | 0

| 採用済み

回答済み
Changing the current axes causes a line that is a child on another axes to disappear.
When you create the second axes, use _'Color','none'_ to make the first axes also visible. See the example of <http://www.mathw...

10年以上 前 | 0

回答済み
Index out of bounds using "length"
WAD. length Length of vector. length(X) returns the length of vector X. It is equivalent to MAX(SIZE(X)) for ...

10年以上 前 | 0

回答済み
Several statements in if condition plotting and drawing arrow
_"...But when I use this code it shows just last nt value in if condition (1001) in the title."_ Surely. Because (quoting fr...

10年以上 前 | 0

| 採用済み

回答済み
adding same size cell arrays
cellfun(@plus,A,B,'uni',0) cell2mat(A)+cell2mat(B)

10年以上 前 | 1

| 採用済み

回答済み
How can I compile the values of a variable based on the value of a second variable?
Using _a_ and _e_ for the two arrays, respectively, >> ix=interp1(a,[1:length(a)].',e,'nearest','extrap') ix = 1 ...

10年以上 前 | 0

回答済み
Finding a character in a string in an array of cells
>> G = {'1010101', '0010101', '0010101'}; >> G{1}(1) ans = 1 >> doc cell % for details on addressing NB: however...

10年以上 前 | 0

| 採用済み

回答済み
How to move set of points diagonally ?
Add the offset to both (or all 3) coordinates... x(i+di;j+dj,k+dk)=x(i,j,k)

10年以上 前 | 0

| 採用済み

回答済み
While loop with multiple conditions
while (resolution_check<8) & (mX_check>0.1) & (Nx<5000) .... Not sure why you left the second conditional off but that...

10年以上 前 | 0

回答済み
How to process text file line by line
doc fgetl >> fid=fopen('fatem.dat'); >> while ~feof(fid) x=sscanf(fgetl(fid),'%f'); % insert desired p...

10年以上 前 | 0

さらに読み込む