Answered
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 years ago | 0

| accepted

Answered
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 years ago | 4

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 1

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 1

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 1

| accepted

Answered
Constants and Matlab Workspace
I've never seen an installation of Simulink but I'm sure it and MATLAB do not share the same workspace...a search finds lots of ...

6 years ago | 1

Answered
inserting long xtick label
Don't label manually at all; use a datetime variable for the x-axis variable in plot() and you'll get datetime ticklabels automa...

6 years ago | 0

| accepted

Answered
How to find a substring within a miscellaneous cell array?
Alternatively, string can convert numerics... >> contains(string(C),"Full") ans = 1×8 logical array 0 1 0 0 0 ...

6 years ago | 0

| accepted

Answered
How to find the position of a real vector in a matrix?
>> find(ismember(A,v,'rows')) ans = 1 >> works here, but in general for floating point values >> find(ismembertol(A,v...

6 years ago | 0

Answered
Get daily max values from timetable keeping the other variables from 'maxed value' row.
OK, just use the "deadahead" solution... ttMAX=varfun(imax,ttbruto,'InputVariables','CAUDAL_XARXA','GroupingVariables','DOY'); ...

6 years ago | 0

| accepted

Answered
How do I just plot a single specific point on a graph?? No answers on here have been helpful!
"want to only plot the maximum power" ... Power=amps.volts; [Pmax,imax]=max(Power); plot(time(imax),Pmax,'or','MarkerFaceCol...

6 years ago | 0

| accepted

Answered
How to add two different lengend boxes for 'yyaxis' plot ?
Just label 'em all...the line types will show up...wait until are done. Comment out the two legend() calls you have and put the...

6 years ago | 1

Answered
I have to do matrix with 'single' vectors
The values don't change, only the display format so you get something other than zero displayed for numbers smaller than the pre...

6 years ago | 0

Answered
How do I filter text in a table?
Don't attach images; use text from command line instead, or attach a small set of the data itself. As for the Q? ix=startsWith...

6 years ago | 0

Answered
Extract Last two Words from strings in cell
> arrayfun(@(s) s{:}(end-((numel(s{:})-1)>=1):end),arrayfun(@(s) split(s).',S,'uni',0),'uni',0) ans = 4×1 cell array {1...

6 years ago | 1

| accepted

Answered
Split csv/excel files into two separate files based on trigger word which always appears in the first column, but not always the same row
I'd probably use xlsread(*) to return column 'A:A' raw data as cell array, search that column for the key word, then use that lo...

6 years ago | 0

| accepted

Answered
How to make this text string column program faster?
Dunno how much better; still think to build the struct so all fields are extant would be far better; then you can use an array o...

6 years ago | 0

| accepted

Answered
How to search particular word for ex. 'Home' in csv file and print it.
Is no builtin text search routine for files; using the system grep utility or like is a very good way to do this if is just to s...

6 years ago | 0

| accepted

Answered
I need matlab code to generate smooth curve for data set
There's a way to save the results of the fit session to the command window, but I always have to figure it out and it's more tro...

6 years ago | 0

| accepted

Answered
Converting a string into a numerical array
v=str2num(extractBetween("[1,2,3,4,5]",'[',']'));

6 years ago | 0

| accepted

Load more