Answered
How to generate data from normal distribution to reflect a pre aassigned score to a variable?
Adjust the mean by some function of the weight--there's no information on by how much, specifically, you might think the differe...

8 years ago | 0

Answered
How to reference a cell in a matrix only if it is preceded by a specific number?
This can probably somehow be done w/ the events objects in the |timeseries|; the overview doc talks about finding patterns but I...

8 years ago | 0

Answered
Putting first line of text files in seperate rows
time_start_of_experiment = cell(number_of_files,1); for ii = 1:number_of_files varNames = textscan(fileID, format, 1, ...

8 years ago | 0

| accepted

Answered
Bar chart plotting of two series
bar(data.Year(1),[data.SP500(1) data.EM(1)]) You're concatenating [data.SP500(1) data.EM(1)] as row vector so its length is...

8 years ago | 0

| accepted

Answered
Import, sort and extract multiple excel files into 1 table/vector
Good start but have made it a little more complicated than need...to get the files in numerical instead of lexical order d=...

8 years ago | 0

| accepted

Answered
How to plot Average of several plots( combined using copyobj) ?
Not without using the data to compute the average, no... But using |copyobj| to combine the plots is the hard way to go about...

8 years ago | 0

Answered
I have a character vector with repeated elements and want to extract each element once and at the sequence of appearance.
[unames,ia,iu]=unique(strtrim(cellstr(Getcurvenames)),'stable'); unames will be the names that are unique in the overall ...

8 years ago | 0

| accepted

Answered
convert categorical column to numeric in a matrix?
Totally different Q? in follow up than original -- You don't show how you "imported" the file, but >> [~,~,r]=xlsread('tr...

8 years ago | 0

Answered
convert categorical column to numeric in a matrix?
>> Stations = {'S1';'S2';'S1';'S3';'S2'}; Stations = categorical(Stations) Stations = 5×1 categorical array ...

8 years ago | 0

Answered
How to filter structured array by several conditions
I'd start be suggesting to rearrange the data |struct|--instead of using three fields with different names for associated data, ...

8 years ago | 0

| accepted

Answered
struct2table produces different results when I use it on different struct files
I still think it would pay to get to the underlying reason for the difference in the beginning but a fixup if I understand your ...

8 years ago | 0

Answered
Subplots are not aligned when using boxplot. Why? Possible bug?
I was able to understand part of it; some of it I still don't know the root cause...the attached is empirical and sets each subp...

8 years ago | 0

Answered
Putting a variable string into a comma delimited string
Wrong tool for the job; while it can write flexible delimiters, I don't see any way to make it write the surrounding quotes wher...

8 years ago | 1

| accepted

Answered
Can you set a plot property as an equation?
Syntax problems... 1. You're mixing "dot" notation with |set| -- use either set(hAnn,'Position', [l b w h]) or hAnn.P...

8 years ago | 0

Answered
How to recreate a piecewise polynomial from polyfit to values in each interval?
OK, I did have time to go read |ppval|; indeed, it does presume coefficients are evaluated from each section as the origin, not ...

8 years ago | 1

| accepted

Answered
Retrieve loop counter values in nested loop, and plotting specific calculation
I didn't notice the "growing" of the vector length...you've got to use a cell array to handle that. total=[]; vec=[]; co...

8 years ago | 0

| accepted

Answered
How to modify a time series plot
See <https://www.mathworks.com/help/matlab/ref/matlab.graphics.axis.decorator.datetimeruler-properties.html Datetimeruler-proper...

8 years ago | 0

| accepted

Answered
Interpolating matrices of different sizes to the same size
See doc resample in Signal Processing TB

8 years ago | 0

| accepted

Answered
How to convert a plot from time domain to frequency domain
See example from the FFT documentation amplified on and some illustrations at <https://www.mathworks.com/matlabcentral/answers/4...

8 years ago | 0

Answered
How to plot an area limited by two functions?
... i1=find(wavelength==wl(1)); i2=find(wavelength==wl(end)); minp=min([power(i1:i2);1-power(i1:i2);p]); hold on ...

8 years ago | 0

| accepted

Answered
can any one help me rectify the error in the attached code? I dont know how the error can be corrected....thanks. Please find the file attached and the error message below.
If you would indent your code reasonably, it would be _much_ easier to read and see the issues...the first place I see glancing ...

8 years ago | 0

Answered
Look-up table row and assign values to individual variables
You can create duplicate variables if wanted, but I'd suggest in the end it'll be better to use table addressing with the variou...

8 years ago | 1

Answered
Hex-to-Binary conversion always outputting 48 or 49
"_my BinaryMat consists of 48s and 49s instead of 1s and 0s."_ I didn't try to read the code but somewhere you've converted t...

8 years ago | 2

| accepted

Answered
Multiple Criteria Look-Up Function within MATLAB
If the data are defined as: d1=repmat([2:5],5,1); d1=d1(:); d2=repmat(1:5,1,4);d2=d2(:); d3=100:100:2000;d3=d3(:); ...

8 years ago | 1

| accepted

Answered
cumulative sum of an array
>> N N = 5 >> S=sum(reshape(b,[],length(b)/N)) S = 15 30 15 30 >> >> S=cumsum(reshap...

8 years ago | 0

Answered
Colored error bar plot with X axis labels
The problem is that |bar| as you've used it draws only the one bar as an individual element so there aren't any ticks set for mo...

8 years ago | 0

| accepted

Answered
Why is my plot function does show any graph?
In for k = 1:21; numerator = new_wavelength(j,11)-new_wavelength(j,k) denominator = Delta_lambda/2; Denom = ...

8 years ago | 0

| accepted

Answered
Index exceeds array bounds
No idea what really trying to accomplish but n = 6; f = zeros(n); % f=nxn array zeros for i = n % ...

8 years ago | 0

Answered
how can i read thousands of nc4 files in one go using loop
Convert to function and then just call it... function ncdinfo(nc_filename) ncid=netcdf.open(nc_filename,'nowrite'); ...

8 years ago | 0

| accepted

Answered
3D stem plot colored by Z-value
Doesn't look easy; there's no _.CData_ property even using Yair's |UNDOCUMENTED| function to find any |stem3| properties that we...

8 years ago | 2

Load more