回答済み
I have a conditional loop that should run when the difference between two numbers n1 and n2 isnot equal to zeros. But sometimes the loop is runs while the difference is equal to zeros. It seems Matlab makes a mistake!! would you help me? Thank you!
Without the actual code and knowing what the variables are it's not certain but a very high probability is that Matlab isn't mak...

10年以上 前 | 0

回答済み
How to draw the below type of graph in MATLAB
Simplest approximation is doc histfit % use optional specified distribution option for Weibull add the annotation with ...

10年以上 前 | 0

回答済み
Finding a value on a plot using code?
Inverse interpolation... >> Vout = [1, 0.95, 0.92, 0.89, 0.82]; >> Time = 1:5; >> T90=interp1(Vout,Time,0.90) T90 ...

10年以上 前 | 0

回答済み
How can I extract the contents of a numbered list within an array?
>> c={'1. h4 e5 2. c3 g5 3. b3 Nh6 4. g4 d5 5. Ba3 Qd6'}; >> textscan(char(c),'%*s%s%s','collectoutput',1) ans = {5x...

10年以上 前 | 1

| 採用済み

回答済み
Why my .exe doesn't write in the .xls file that I provide?
Probably the working directory isn't the same in the .exe as it is when you're running inside Matlab so you're creating a new fi...

10年以上 前 | 0

回答済み
Separate string and perform math operations in Matlab
Something's going in what what _isn't_ shown; namely the actual code inline with the results instead of piecemeal describing wha...

10年以上 前 | 1

| 採用済み

回答済み
Extract several rows from Matrix, Manipulate them in a Function and Re-Insert them at same position in Matrix
Address the target the same way as the selection... ix=(SubSets==1); % LOGICAL would be superfluous here, used a shorter i...

10年以上 前 | 1

| 採用済み

回答済み
How can I plus (append) string in each loop?
I presume _output_ is a typo intending _person_. But you don't need a loop nor any logical tests at all... >> people=['A':...

10年以上 前 | 1

回答済み
How to get a single beta in a univariate regstats regression
Save the coefficients from the structure to an array via comma-list via brackets notation and retrieve from there-- beta=[s...

10年以上 前 | 0

回答済み
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
As of last day (or perhaps two?) every reply Answer/Comment elicits the "Leave Page?" popup even when have SUBMITted the respons...

10年以上 前 | 0

回答済み
Formula for cross-correlation in matlab
In the Statistics Toolbox, see doc corr

10年以上 前 | 0

回答済み
For-loop refuses to save five values in 1 vector, instead saves one value in 5 vector. How do I fix this?
Use vector solution...one of many ways x=abs(x); mextreme=x([false and(diff(x(1:end-1))>0,diff(x(2:end))<0)]); Exampl...

10年以上 前 | 0

| 採用済み

回答済み
Read in a .txt format with textread
Besides the comment noted above by Star, your format string doesn't match the record -- the date/time fields aren't valid _'%f'_...

10年以上 前 | 0

回答済み
How to find the max deflection in the beam and position of the max deflection ?
You've run the loop to compute _y_ but didn't save anything excepting the last value since didn't use an array but just a single...

10年以上 前 | 1

回答済み
what does 1x8 struct mean?
It's an array of structures oriented as a row vector of those structures, each entry of which has three fields. Simple example ...

10年以上 前 | 0

回答済み
How to remove rows in a table
Ensure the data are sorted in ascending date/time then use *unique*. The default for the optional named parameter _'occurrence'...

10年以上 前 | 0

回答済み
Index out of bounds error
H1(1) = H0; for i = 1:(N-1); ... Pm1(i) = eta * rho * g * (Hm(i)-H1(i)) * Qm1(i); ... end %Available H...

10年以上 前 | 0

| 採用済み

回答済み
¿How can I get the value of a variable that is inside a function?
Since you have to write the specific variable anyway, I'd just add the name--something like ... A=random(5); >> A=randn...

10年以上 前 | 0

| 採用済み

回答済み
Matrix Indexing from an Array of Numbers
One soluion; may be some "more better"... idx=cell2mat(arrayfun(@colon,Z,Z+4,'uniform',0))); % column indices vector A=...

10年以上 前 | 1

回答済み
Function Sort to find smallest value in a Column?
Don't have Toolbox here so can't try it, but looks like you'll want the *sortfts* function to deal with a _FTSOBJ_ See <http:...

10年以上 前 | 0

回答済み
Regarding a plotyy generated plot: using the edit plot feature, can I make changes such as font size on the right hand side vertical axis?
W/O anything else, doesn't appear you can. If you save the axes handles when create the figure with *plotyy* and then set the R...

10年以上 前 | 0

回答済み
How do I plot real and imaginary parts on one graph(figure)? And how do I do that separately?
No need for symbolics here...I'd use function handles instead-- xred=@(x) 6*pi*10.^8./x; % make a simplification by defini...

10年以上 前 | 0

| 採用済み

回答済み
Plotting time vector in seconds on x-axis in HMS
Prior to R2015, use *datenum* and convert to datenumbers and plot against them and then *datetick* to display the axis with time...

10年以上 前 | 0

回答済み
Problems with for-loop.
The loop above in Matlab parlance is simply z(1:length(tfail_or_ges))=(t==tfail_or_ges_sort); where _z_ will be the logi...

10年以上 前 | 0

回答済み
How to reformat a matrix with a continuous string
>> B=[cellstr(num2str(A(:,1))) cellstr(char(A(:,2:end)+'A'-20))] B = '7843' 'ABCEB' '2345' 'BDCEF' '545...

10年以上 前 | 0

| 採用済み

回答済み
how to fill the value of "1" where ever you want in an array.
_"repetition of 1's sequence in the positions 1,17,33,49..." Use colon indexing-- t(1:16:LENGTH)=1; where _LENGTH_ is...

10年以上 前 | 0

回答済み
How to use xlswrite to wirte excel sheet each time dynamically?
You have to decide where in the sheet you want the values written; *xlswrite* will not accept multiple ranges in a single call; ...

10年以上 前 | 0

回答済み
How to get rid of the baselines while using "waterfall" command?
This may not be the best solution but I don't have time to delve into the guts of *waterfall* and/or *mesh* to figure out precis...

10年以上 前 | 0

| 採用済み

回答済み
4 curve in one graph
File Exchange is your friend... <http://www.mathworks.com/matlabcentral/fileexchange/4425-ploty4-m <PlotY4>> or <http://www.math...

10年以上 前 | 1

| 採用済み

回答済み
how can I sort an array of elements corresponding to another array of elements in decreasing order?
[A,idx]=sort(A,'descend'); B=B(idx); doc sort % for details

10年以上 前 | 3

さらに読み込む