Respondida
How to adjust the position of the x-axis ticks and put the angle degree on the values of the x-axis ticks?
With all values in one decade, log plot gets pretty squished; you can set the xlim to just cover the actual range and then only ...

alrededor de 4 años hace | 0

Respondida
Why can't i change an excel file sheets during a loop in matlab
Because in ewb.Worksheets.Item(1).Name =[Varlist(1,a)] ; that's exactly what you told it to do -- rename Item(1) each time. U...

alrededor de 4 años hace | 0

| aceptada

Respondida
Create a new excel file from trimmed data
Shure...just build a file name dynamically somehow instead of incrementing the sheet number as you did. FILES={'T04A', 'T04A_1'...

alrededor de 4 años hace | 0

| aceptada

Respondida
Combine data from text files into 1?
Exact details for the easiest way to handle the three files would depend on how they're named/saved so as to keep the sets assoc...

alrededor de 4 años hace | 0

| aceptada

Respondida
Plot on Boxplot on the same graph
Shift/Rescale the hourly times to be centered about the 1:N values. boxplot(T) hold on W=0.8; % fractional width of eac...

alrededor de 4 años hace | 0

| aceptada

Respondida
"Axis" function error
-3 < 0 despite abs(3) being greater -- as the error message says, the axis limits have to be in strictly ascending order numeric...

alrededor de 4 años hace | 1

| aceptada

Respondida
How to extract row data by searching in matrix.
x=45; y=105; % lookup values; use variables, don't bury magic numbers in executable code ixy=(Species(:,3)==x)&(Species(...

alrededor de 4 años hace | 1

Respondida
I would like to plot few values of a vector based on threshold setting from another vector.
It works; you just can't see the single point that is left because the single point on a default line width without a marker jus...

alrededor de 4 años hace | 1

| aceptada

Respondida
How to filter table rows according different conditions?
NHATS_table = readtable(file_name,"VariableNamingRule","preserve"); NHATS_table.Object=categorical(NHATS_table.Object); % c...

alrededor de 4 años hace | 1

Respondida
How do I create x-axis in boxplot?
You've got the orientation of the array backwards to use boxplot effectively; it thinks columns are variables and rows observati...

alrededor de 4 años hace | 1

| aceptada

Respondida
Error using fgets Invalid file identifier. Use fopen to generate a valid file identifier. Error in fgetl (line 34) [tline,lt] = fgets(fid);
Indeed, just downloaded and unzipped into a clean subdirectory -- it isn't the failure to open ID.dat that you're seeing, it is ...

alrededor de 4 años hace | 0

| aceptada

Respondida
extracting nonpivot columns from a matrix
function npc = nonpivotcols(A) [~,p]=rref(A); A(:,pcols)=[]; npc=A; end or function npc = nonpivotcols(A) [~,...

alrededor de 4 años hace | 0

| aceptada

Respondida
Check if number of changes from negative to positive on data table and perform set of conditional tests
A=[-5.67 0.999 -5.66 0.994 -5.55 1.024 -5.38 1.049 -5.19 1.065 -4.42 1.175 -3.00 ...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to create a log_file.txt that stores my outputs and variables?
Use fid=fopen(fillfile('LogFileBaseLocation','LogFileName.txt','a+'); to open the file for append, read/write access. See fop...

alrededor de 4 años hace | 0

Respondida
I cant seem to figure out how to plot my final answer theta-x axis and A,B,C in the y direction. all in 3 separate plots.
E1=40*10^3; E2=8*10^3; v12=0.25; G12=4*10^3; IsotropicComplianceStiffness(E1,E2,v12,G12); function [S,Q]= IsotropicCompli...

alrededor de 4 años hace | 0

| aceptada

Respondida
How do I make a probability plot of ranges of values below a certain threshold?
The Q? asked is ... t_delta = max(durations); % strange variable name??? n=histc(durations,1:t_delta); % counts by bi...

alrededor de 4 años hace | 1

| aceptada

Respondida
X axis tick labels
The x-axis is not numeric but a @doc:datetime Hmm...I thought they had made that a visible property (bells ringing, @Adam Danz ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Error using horzcat Dimensions of arrays being concatenated are not consistent.
In the code section where you combine OBP_i and OBP OBP_i=0; OBP_b = cumsum([OBP_i OBP']); when you only consider a single co...

alrededor de 4 años hace | 0

| aceptada

Respondida
readstruct/writestruct changes boolean value true to "true"
Should be able to test this out on local machine... >> s.M1.Normal.enabled=true; % trial struct with logical variable >> s....

alrededor de 4 años hace | 2

| aceptada

Respondida
Weighted mean by groups
It's the wmean function definition that's doing it -- what you intended was wmean = @(w,v)mean(w.*v); trying that, id = { 'a'...

alrededor de 4 años hace | 0

| aceptada

Respondida
Error about preallocating for speed
a = []; y = 1; for T = 25:5:1000 D = 0.0062*exp(-80000/(8.31*T)); x(y) = 1/T; %error here a(y) = D; %error here...

alrededor de 4 años hace | 0

Respondida
How can I add individual datapoints and connecting lines to grouped boxchart?
fn=websave('Data_example.xlsx','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1136410/Data_example.xlsx'); tD=...

alrededor de 4 años hace | 0

Respondida
When converting a .txt file to a matrix/cell, MATLAB merges some of the columns together.
C = readcell ('filename.txt'); writematrix ('filename.txt'); C ([1:40], :) =[]; % Delete rows 1-40 from the produced matrix (t...

alrededor de 4 años hace | 0

Respondida
Scatter plot with mean for multiple groups
fn=websave('MATLAB_exampledata.xlsx','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1136975/MATLAB_exampledata....

alrededor de 4 años hace | 0

| aceptada

Respondida
How to draw negative values ​​on bar when it contains negative values
That's a little more tricky and the examples don't illustrate -- but it's not terribly difficult to fix; the problem is 'Vertica...

alrededor de 4 años hace | 0

| aceptada

Respondida
Stacked plot graphics, trying to color multiple lines on one y-axis.
OK, had just a few more minutes -- the real answer is that there's a 'LineProperties' handle under the stacked plot object handl...

alrededor de 4 años hace | 0

Respondida
Drawing different coloured bar plots according to different conditions
Well, let's see if I parsed this correctly... data =[ 1 1 2 1 2 35 40 23 36 0 0 1...

alrededor de 4 años hace | 1

| aceptada

Respondida
how to avoid getting 0 overlap on the pie chart?
I've never tried a legend with a pie chart; I suppose it also probably works somehow... Well, the patch handle is two objects p...

alrededor de 4 años hace | 0

Respondida
How to use dir function with customized number of folders
Go ahead and read all the files into the dir() stuct and then do the culling there... It's easy enough to parse those filename ...

alrededor de 4 años hace | 1

Respondida
Duplicate elements in each row
Sure, if am reading the desired output correctly -- NB it appears your c variable is indexed incorrectly; it should be a logical...

alrededor de 4 años hace | 0

Cargar más