Respondida
Plot range of values as bars
OK, the |bar| option works pretty easily, actually, with some handle-diving for how things are organized. % first make up ...

más de 8 años hace | 1

Respondida
How to create a random permutation that has specific values in a specific place?
Writing multiple sequentially-numbered variables is a bad idea in general but won't try to get into fixing that here...but if we...

más de 8 años hace | 0

Respondida
What mean ''All zero sparse''
Yes; pretty easy to just check and see... >> A(3,3)=1; >> S=sparse(A) S = (3,3) 1 >> S(1,:) ans = All ze...

más de 8 años hace | 0

Respondida
Converting a string containing a function (t) to a useable variable.
Need to convert string to the function--- >> t=0:pi/8:pi; % predefined t >> s='20*cos(4*t)'; % sample ...

más de 8 años hace | 0

| aceptada

Respondida
How can i plot mol fraction NO on many combustions cycle?
Can simplify code complexity significantly which helps in both writing and debugging in following line Y1no=1e6*yno(:...

más de 8 años hace | 0

| aceptada

Respondida
How do I write code to store the data in a textbox using the format (dd/mm/yyyy) the same image as shown.?.
set(handles.DateFind,'String',datestr(setDate, 'dd/mm/yyyy')); where |setDate| is your datenum value. I'd suggest not us...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

Respondida
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, ...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

| aceptada

Respondida
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=...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

Respondida
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 ...

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

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

más de 8 años hace | 0

Respondida
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, ...

más de 8 años hace | 0

| aceptada

Respondida
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 ...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 1

| aceptada

Respondida
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...

más de 8 años hace | 0

Respondida
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 ...

más de 8 años hace | 1

| aceptada

Respondida
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...

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

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

más de 8 años hace | 0

| aceptada

Respondida
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...

más de 8 años hace | 0

Respondida
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 ...

más de 8 años hace | 0

| aceptada

Respondida
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 ...

más de 8 años hace | 0

Respondida
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...

más de 8 años hace | 1

Respondida
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...

más de 8 años hace | 2

| aceptada

Respondida
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(:); ...

más de 8 años hace | 1

| aceptada

Cargar más