回答済み
Bar graph for two different arrays
Didn't read doc bar did you? It'll take 1:5 on the x-axis but bar([a;b].')

6年以上 前 | 1

| 採用済み

回答済み
Removing NaN in Linear Regression Problem. Error in line 66.
You don't pass the table to regress but the variables to be used in the regression -- then you won't run into the issue inside r...

6年以上 前 | 0

| 採用済み

回答済み
Reordering string arrays if string is >9
<ileexchange/10959-sort_nat-natural-order-sort>

6年以上 前 | 1

回答済み
read coordinate from a txt file
textscan is overkill for a simple csv file of the above form -- controlpoints=importdata('YOURTEXTFILE.CSV'); and you'll have ...

6年以上 前 | 1

| 採用済み

回答済み
Convert cell array to double, with comma separated elements
>> v=cell2mat(cellfun(@(s) sscanf(s,'%f,').',c,'UniformOutput',false)) v = 126.5000 250.5000 22.0000 27.0000 127.500...

6年以上 前 | 1

回答済み
Trouble adding error bars to bar graph
<Answers/379570-how-can-i-place-my-error-bar-in-separate-bar-center> <Answers/359237-how-do-i-label-each-bar-in-bar-group-with-...

6年以上 前 | 0

| 採用済み

回答済み
Create a maxtrix of row x columns and add values (column-wise) in a loop
Comment moved to Answer since did seem to be the Q? asked... j=0; % initialize other array counter ...

6年以上 前 | 1

回答済み
Use all table/timetable variables as input arguments of function without writing each variable manually.
As a start altho need more to know precisely what else to do, look at\ >> rowfun(@corrug_parameters,B3_B4,'InputVariables',{'di...

6年以上 前 | 0

| 採用済み

回答済み
Output from while-loop at fixed values
Either compute the number of timesteps corresponding to your dt and desired frequency if dt is constant and output every N times...

6年以上 前 | 0

| 採用済み

回答済み
Write matrix to a Tab-Delimited text file
If are only numeric values in those three columns, then why not use the numeric return values from n instead? Depending on the ...

6年以上 前 | 1

回答済み
Matlab Simplifies Function To 0
That doesn't define a function in MATLAB syntax; it assigns the evaluation of the RHS of the assignment statement to a 3D array ...

6年以上 前 | 1

回答済み
How to change x and y labels limts
"When I put duration i got error. When I use xtick, the label didnt; fit to reality. " Must not have tried very hard or read t...

6年以上 前 | 1

回答済み
about a ChemName function
You just pass the struct as the argument to the function and return the same struct; there's nothing required in MATLAB to defin...

6年以上 前 | 0

回答済み
Center of repeatative/duplicate values in Matlab
val=unique(A); iC=arrayfun(@(x) median(find(A==x)),val); for your A above >> val=unique(A); >> iC=arrayfun(@(x) median(find(...

6年以上 前 | 0

回答済み
How to delete rows from a TimeSeries variable
delsample timeseries are different...only can address by the time values or events, not linear indexing. I've never found them...

6年以上 前 | 0

| 採用済み

回答済み
How to take common data from two matrix with different dimensions
unzip ACCESS1.0.zip fd='ACCESS1.0'; A=xlsread(fullfile(fd,'ACCESS1.xlsx')); E=xlsread(fullfile(fd,'ERA5_1985_2005.xlsx')); d...

6年以上 前 | 0

| 採用済み

回答済み
Why are empty square brackets used in this fsolve function?
It's an undocumented trap door that allows other parameters to be passed to the objective function; the [] placeholder bypasses ...

6年以上 前 | 4

| 採用済み

回答済み
How to convert a column in matrix from string to numeric
data = readtable(['data' cell2mat(indexVars(i))], 'Format','%s%f%{yyyyMMddhhmm}D%f%f%f'); 'hh' is for 12-hr day; 'HH' is for 24...

6年以上 前 | 0

| 採用済み

回答済み
Intersection of a line with constant slope and a line with changing slopes
idx = 2980; % calls upon river profile #2980 out of 10848 channel_height=0:20; channel_length=...

6年以上 前 | 0

| 採用済み

回答済み
How to convert time (duration) to datetime?
The datetime class cannot exist without both a date and a time component. You'll have to assign a date as well... du=duration(...

6年以上 前 | 1

回答済み
Is it possible to assign new values which are integers to categorical array?
See the above comment, but if there is some reason you really, really need/want the numbers instead on the axes, then hAx=gca; ...

6年以上 前 | 0

回答済み
I have to compare data from matrix with different dimensions
Convert both to timetable or timeseries objects and use retime to synchronize the two.

6年以上 前 | 0

回答済み
Pahse Shift as a Function of Height
Well, if you already have a phase shift, that's something else entirely...carrying on from above phasedata=importdata('Schmidt...

6年以上 前 | 0

| 採用済み

回答済み
Conversion to double from function_handle is not possible error message
function [u]=fixeddiffusion(h,N,dt,t0,theta,u0,uN,uinitial,x0,xN,uexact) ... b=zeros(N-1,1); for i=1:N-1 b(i)=uinitial(i+1);...

6年以上 前 | 0

回答済み
Datetime comparison near full hours
isBad=~cell2mat(arrayfun(@(t) any(abs(PC_SoftStart-t)<=minutes(1)&~isnat(PC_SoftStart),'all'),TR_SoftStart.Data,'UniformOutput',...

6年以上 前 | 0

回答済み
Trouble with interpolation and gridding data points
Write a (vectorized) function for M(x1,x2), compute the interpolating grid [X,Y] with meshgrid and then call the function with ...

6年以上 前 | 1

回答済み
A loop for multiple .xlsx files import with different names
Your wildcard specification dir(fullfile(source_dir, '*.xls')) will only find files ending in precisely 'xls' and your text says...

6年以上 前 | 1

| 採用済み

回答済み
Find more time-efficient way to extract data from a .txt file
While I'm convinced you really don't need the files at all and probably with only a minor amount of rearranging if it works as i...

6年以上 前 | 1

| 採用済み

回答済み
Validate and get exact number of characters using the regular expression
I can get you closer, but not exactly right... regexp(s,'-\d{2}\>','match') will return only matches of exactly two digits aft...

6年以上 前 | 0

回答済み
Create a randomized grouping matrix using one-liner
Without the constraints, and without initialization, >> R=[1:N].'; C=randi(M,N,1); % N,M num rows, columns respectively ...

6年以上 前 | 1

| 採用済み

さらに読み込む