回答済み
norm inbuilt function code
That's how _all_ builtin functions work in Matlab, that's why they're "built in"; the working part of the function is compiled c...

8年以上 前 | 0

| 採用済み

回答済み
Updating mean and standard deviation
You can keep the partial sums mu=SUM(x)/N --> SUMX/N SUMX=SUMX+xnew-xold; xold=xnew; in each iteration. Similarly...

8年以上 前 | 1

| 採用済み

回答済み
On semilogx graph I have two known points and I wish to find out values on a linear line between these two points
Not sure the question, precisely, but consider x = [10 500 10000]; y = [5 15 50]; figure semilogx(x,y,'-'); gri...

8年以上 前 | 0

| 採用済み

回答済み
how to compare one element in an array with all the other elements in another array? And repeating it for n elements in the first array?
A = [ 1, 2,3,4,5] B = [ 3,4,2,6,8,0] Taking a guess, and what was written literally, >> for i=1:length(A) B...

8年以上 前 | 0

回答済み
how to omit zero values while plotting the graph
A) yplot=y; % make a copy of the data specifically for plotting yplot(yplot==0)=nan; % replace 0 elements ...

8年以上 前 | 8

回答済み
find the index of the mean and mode of a plot
doc find *NB:* there's nothing that says there _will_ be a value in the _Y_ vector that matches the value of the mean; lik...

8年以上 前 | 0

回答済み
What is the function for receiving a vector that will contain the elements of the second diagonal?
Read the input description; there's a second optional argument to |diag|

8年以上 前 | 1

回答済み
How using function Stairs for a market ?
S = [400 500 200]; % supply PS = [15 25 55]; % Price supply [PS,iPS]=sort(PS); % sort price ascendin...

8年以上 前 | 1

| 採用済み

回答済み
Heatmap labels based on another matrix
See the examples; you didn't call it with anything excepting the data array so it can't "know" anything about labels... <http...

8年以上 前 | 1

| 採用済み

回答済み
Error calling global variable in function
|global Global_Coeff;| has to be in every workspace and/or function that wants/needs access to the global variable; all you've d...

8年以上 前 | 1

| 採用済み

回答済み
Separating Data into columns based on certain text variable in that data
>> data=readtable('jack.dat','format','%{MM/dd/yyyy}D %s %f%%') data = Var1 Var2 Var3 __________ ...

8年以上 前 | 0

| 採用済み

回答済み
Changing the parameters of a for loops if condition is met
... Q=1 % heating of 1kW QMult=[2 5]; % choices from original posting for Y = 1:NOC for x = ...

8年以上 前 | 0

| 採用済み

回答済み
How can I find the range of empty data in a table
Just use |ismissing| on the original table.

8年以上 前 | 0

| 採用済み

回答済み
Edit the limits in least squares line.
If you need to do more than what |lsline| does which is to draw the line from the axis limits but not give anything else useful ...

8年以上 前 | 0

回答済み
How to provide 2-Y axis scale in a plot function ?
See doc yyaxis

8年以上 前 | 0

回答済み
How to plot observations against season and time of day?
Somewhat more enhanced...turned into a function with some input parameters to control some features; uses the same input data fi...

8年以上 前 | 0

回答済み
How to plot observations against season and time of day?
Well, here's a (not _quite_ so) crude second pass... <</matlabcentral/answers/uploaded_files/110569/untitled.jpg>> Incorpo...

8年以上 前 | 0

| 採用済み

回答済み
How to extract data from multiple data files?
In broad strokes, bdr=readtable('boundaryfilename.txt','delimiter','tab'); d=dir('*.txt'); % use appropriate wildcard t...

8年以上 前 | 0

回答済み
Sum for every n number within a single column vector
The inside-information way is just sum(reshape(x,48,[])) making use of internal storage order and that Matlab functions ...

8年以上 前 | 0

回答済み
How could it be that by FFT is not symmetric?
FTrho(2:end-1) = 2*FTrho(2:end-1); You're doubling the DC component, too.

8年以上 前 | 0

回答済み
Combing information from 4 columns to create a new column
Presuming it is in a spreadsheet as shown above, read the file as text; then the empty cells will remain empty instead of being ...

8年以上 前 | 0

回答済み
How to generate 200 random numbers between -1 and 1 (x-axis and y-axis), resulting in plot from x-axis -1 to 1 and y-axis -1 tot 1 filled with 200 blue diamond points?
Two problems-- # x = -1 + randn(200) simply shifts mean of RNV from 0 to -1 leaving range alone about mean # plot (x,'bd') p...

8年以上 前 | 2

| 採用済み

回答済み
Read multiple .CSV files with csvread using a for loop
d=dir('*_p.clv'); % dir struct of all pertinent .csv files n=length(d); % how many there were data=cell(1,n); ...

8年以上 前 | 2

| 採用済み

回答済み
How do I calculate a sliding correlation between two time series
Presuming no missing observations and beginning at the minute, 5 min/[5 sec/sample/60 sec/min]--> 60 samples. Given the two sig...

8年以上 前 | 0

回答済み
How to get the probability value (y) for a given (x) from a probability normalised histogram?
If you fit a functional to the distribution, then use |icdf| (inverse cdf) with those parameters; if empirical only then it's a ...

8年以上 前 | 0

| 採用済み

回答済み
Computing average absolute time from date strings without years
t=readtable('example.csv'); % read the data t.folder=char(t.folder); ...

8年以上 前 | 0

回答済み
Ploting data from .txt file
|timeseries| doesn't plot anything; all it does is create a timeseries object. Per the documentation, the data for the _time ve...

8年以上 前 | 0

| 採用済み

回答済み
When I first learned programming ...
First was a two-week stint in an intro NE course (also w/ McCracken, of course) in which were taught rudiments of syntax and all...

8年以上 前 | 1

回答済み
Averaging data sets with certain criteria (month and year)
See <https://www.mathworks.com/help/matlab/ref/splitapply.html <splitapply>> For your specific case and data as coded, if you l...

8年以上 前 | 0

| 採用済み

回答済み
More than 16 barplots in one figure?
By default there aren't tick marks every integer value; they typically make things too crowded. xlim([0 17]) ylim([0 10]...

8年以上 前 | 0

| 採用済み

さらに読み込む