回答済み
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年以上 前 | 1

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 1

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 0

回答済み
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年以上 前 | 1

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

回答済み
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年以上 前 | 0

| 採用済み

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

6年以上 前 | 0

| 採用済み

回答済み
size of matrices in a struct
A loop is involved, yes, but you can write it w/o coding the loop explicitly. Part depends upon just what it is you want; what ...

6年以上 前 | 0

回答済み
Create a single average day out of hourly data (33days)?
"First row is date second is hourly mean temp." That would be column, not row, as just a nit. Yes, either groupsummary or varf...

6年以上 前 | 0

| 採用済み

回答済み
Stress testing to find parameters uncertainty
See some previous answers to the question... <<Answers/415341> and <Answers/120978> The comments by @SK go to the question of ...

6年以上 前 | 0

| 採用済み

回答済み
Unusual size of saved variable as .mat file
"I expect ,the size of this structure ... not to be much much bigger than my data..." That's perhaps a reasonable expectation o...

6年以上 前 | 0

| 採用済み

回答済み
any suggests, solutions ?
Jeremy is correct... ncparamteres.m would contain: %ncparamteres.m % Script to create variables in the calling MATLAB works...

6年以上 前 | 0

回答済み
How can I find the best curve of a set of curves to fit data points?
How can there be a question of "which one is best"? You have a physical model and one constant, k, to estimate so a least squar...

6年以上 前 | 0

回答済み
How to create a fit like 1/(x^n)
Of course, the above can be linearized by log transform... b=polyfit(log10(x),log10(y),1); >> b(1), 10^b(2) ans = -1.44...

6年以上 前 | 1

| 採用済み

回答済み
Merge a selected rows to creat a single row
EDITED for ROW ORDER CORRECTION -- dpb function X=reshapeNperRow(x,Nper) % X = reshapeNperRow(x,Nper) % reshapes input array ...

6年以上 前 | 1

| 採用済み

回答済み
Append lines to interrupted CSV file by calculating new values while ignoring lines that have text information
Functional, but somewhat more in the MATLAB spirit...using vectorized operations in contains function and input/output... chrs...

6年以上 前 | 0

回答済み
How can i convert my data into matrix vectors?
dataExp=[2741.8, 2760.5, 3006.8, 3140.8, 3422.6, 3854.6, 4424.6, 4699.4, 4922.4, 5596]; dataNum=[2721.9, 2753.8, 2989, 3122.2, ...

6年以上 前 | 0

回答済み
''Unable to perform assignment because the left and right sides have a different number of elements.''
ts(1)=t(max(find(f1>=tolerance))); and friends can return an empty RHS if no element satisfies the condition.

6年以上 前 | 0

回答済み
How to add hat symbol to "xtick"
Have to escape LaTex sequences with "$$" before and after...try something like hAx=axes; xlim([1 3]); xticks([1:3]) % a samp...

6年以上 前 | 2

| 採用済み

回答済み
How to plot a polynomial function, having the ordinate coordinates symmetrical about the abscissa (horizontal line)
Well, it's not too hard to get reasonably close...you don't have enough points on yours for the smooth line...the following code...

6年以上 前 | 0

回答済み
find minimum value of a two-variable equation on an interval.
"...is there anyway I can delet[e] the dot but the equation can still work?" Ah! Indeed I didn't follow along the nub of the q...

6年以上 前 | 0

| 採用済み

回答済み
Hiding Plot Elements makes those elements appearing in the legend and the legend itself a much lighter shade than it should be. How to fix this?
OK, wasn't too hard to take yours and make an example... figure(1) colormap jet hAx(1) = subplot(5,5,[1,2,6,7]); yyaxis le...

6年以上 前 | 0

| 採用済み

さらに読み込む