回答済み
How can I control a GPIB device's parameters from GUI?
Sure, just build a command string to send...but in query(g1,'CTRWL handles.CWL') the 'CTRWL handles.CWL' is a literal st...

9年以上 前 | 1

| 採用済み

回答済み
how to plot a spreadsheet in 3D
You can try *surf* but unless you have data in a regular grid, Matlab surface plotting routines are exceptionally weak; in that ...

9年以上 前 | 0

回答済み
I keep on getting the response: "Error using * Inner matrix dimensions must agree" when running a script. Any Idea on what to do?
_"In a while loop... v=((sqrt(T)*tanh((sqrt(T)*sqrt(0.5*Cd*A*rho-fr*t))/Ma))/(sqrt(0.5*Cd*A*rho-fr)));"_ But _v_ and _t_...

9年以上 前 | 1

回答済み
Writing the column vectors of matrix X into individually specified columns of matrix Y
Oh, probably with great obfuscation but if you'll preallocate _Y_, I'd expect the loop would be quite fast enough...

9年以上 前 | 0

回答済み
Saving function variables without evil eval
Just *save* then *load* will do all automagically...see doc save % for details

9年以上 前 | 3

回答済み
Index a percentage of a Matrix
85% of what--the indices, the values, ...? And, if it's is a matrix, what about shape? Matter where they came from or just ove...

9年以上 前 | 0

回答済み
How can i restore complex numbers from abs(fft)?
_"In short, How can i restore complex number?"_ In short, "you can't" once you've thrown away the separate magnitude and phas...

9年以上 前 | 0

| 採用済み

回答済み
Filtering a wind direction vector by a wind magnitude vector?
Use logical addressing... ix=(wndSpeed>=5.0); data=[wndSpeed(ix) wndDirection(ix)]; % keep desired Use time vector s...

9年以上 前 | 0

| 採用済み

回答済み
Plotting data with timestamps
Convert from whatever format the timestamps are in to a Matlab representation of dates...with R2014 up, there's the _datetime_ c...

9年以上 前 | 1

| 採用済み

回答済み
Automatically detect last row of CSV file with dlmread
With a sequential file, "no, not really". It'll likely be just as fast to read the whole file every time and discard all except...

9年以上 前 | 0

回答済み
How to calculate percentage increase in MATLAB?
>> v = [2518629;2755823;2981659;3334874;3692492;4068109;4434682;4830979;5263593;5674380;6070581;6453628;6909000]; >> [v(2:en...

9年以上 前 | 1

| 採用済み

回答済み
In a CSV file there are around 200 values (200*1) matrix form. I want to take a particular value which is repeated more than other values. How will I be able to take this.
_"...get this number (5) from a CSV file and import to matlab."_ Backwards thinking--first *read* the file, _*then*_ find the...

9年以上 前 | 0

回答済み
How to find indexes of 10 maximal valuse in a given NxN (symetric) matrix?
Always just try the straightforward solution first-- nMax=10; [~,ix]=sort(c(:),1,'descend'); [i,j]=ind2sub(size(c),ix(1:...

9年以上 前 | 0

| 採用済み

回答済み
How to calculate moving average excluding current data?
N=20; % number above/below midpoint u=[ones(1,N) 0 ones(1,N)]/(2*N-1); % weighting mAvg0=...

9年以上 前 | 0

回答済み
variable section value give me some mean value but std is zero
You've double-compensated for the 2D image in im = double(im(:)); m=mean(mean(im)); s=std(std(im)); _im_ is now a...

9年以上 前 | 1

| 採用済み

回答済み
How do you plot a data set with black crosses and a red line connecting them
hL=plot(randn(10,1),'r+-','markeredgecolor','k');

9年以上 前 | 0

| 採用済み

回答済み
Read .csv file with whitespace in complex number using textscan
You can do all in Matlab by first reading full file as *char* array and doing a string replacement for the ill-formed blank betw...

9年以上 前 | 0

| 採用済み

回答済み
extract value at a specific location
Tst=interp2(T1,lon_desired,latitude-desired) Don't supply the coordinates of the reference T array so the values requested ...

9年以上 前 | 0

| 採用済み

回答済み
uniform distribution between a and b with intervals of 0,005
Well, I'd guess so...that wouldn't be very random at all...but, the simple-minded approximation would be >> N=10; >> n=r...

9年以上 前 | 0

回答済み
Transpose... Not Transposing!
I'm quite certain Matlab is _not_ "not transposing"; symptom sounds to me as though likely you're alternating operating on a row...

9年以上 前 | 1

回答済み
in order to plot in 3D, which method to read the data is best? fgetl, fscanf, or textscan?
What defines "best" for reading data is the input form of the data file, not the end result (although of the above, *fgetl* is p...

9年以上 前 | 0

回答済み
Scatter of response data against time and trial number. Differences in vector size.
IIUC, either # use *hold on* after plotting first, then add the others, or # fill in the shorter vectors with NaN as placeho...

9年以上 前 | 0

回答済み
Why does an if-structure exceed the given limit?
Welcome to the wild and wacky world of floating point arithmetic! 0.1 isn't exactly representable in binary (it's a continuing ...

9年以上 前 | 0

| 採用済み

回答済み
What is the right way to put a polynomial into a function?
_"the polynomial ... is: c(0) +c(1)x^1 +c(2)x^2+...+c(N)x*N"_ y=polyval(fliplr(c),x); Better would be to define your coe...

9年以上 前 | 0

| 採用済み

回答済み
Trying to write each iteration of a for loop into Excell
Use the vector, Luke! :) "The Matlab way" is to avoid looping when unneeded-- Yb=Y1+[-20:80].'; % NB: transpose...

9年以上 前 | 1

回答済み
How do I fit to 2D data using a custom function defined in a separate file?
*fittype* tries to be too clever by far, imo. By default, _"x is the independent variable, y is the dependent variable, and all...

9年以上 前 | 0

回答済み
a a aa a
If have Stat Toolbox, use *crosstab* with the variables as grouping variables.

9年以上 前 | 0

回答済み
How to return the row vector containing the highest values from a matrix?
Sort first by row (already done here in these examples), then by column, retaining the sort index. Then (I think, altho didn't ...

9年以上 前 | 0

回答済み
How can I sum daily files over different years to quarters?
Read in the directory of all files and use regular expressions or string comparison to find those locations containing 01 thru 0...

9年以上 前 | 0

回答済み
How do I calculate seasonal means from monthly data?
I answered this for another poster some time back here: <http://www.mathworks.com/matlabcentral/answers/241277-mean-for-particu...

9年以上 前 | 1

| 採用済み

さらに読み込む