Community Profile

photo

dpb


Last seen: Today Active since 2012

Statistics

All
  • Revival Level 2
  • First Review
  • Master
  • Thankful Level 3
  • 36 Month Streak
  • Knowledgeable Level 5
  • First Answer
  • Solver

View badges

Content Feed

View by

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

ungefär en timme ago | 0

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

ungefär 22 timmar ago | 0

| accepted

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

en dag ago | 0

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

en dag ago | 0

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

2 dagar ago | 0

| accepted

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

2 dagar ago | 0

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

3 dagar ago | 0

| accepted

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

3 dagar ago | 0

| accepted

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

4 dagar ago | 1

| accepted

Answered
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'...

4 dagar ago | 0

| accepted

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

4 dagar ago | 0

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

5 dagar ago | 0

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

5 dagar ago | 0

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

6 dagar ago | 0

| accepted

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

6 dagar ago | 0

| accepted

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

6 dagar ago | 0

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

7 dagar ago | 1

| accepted

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

7 dagar ago | 0

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

7 dagar ago | 1

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

7 dagar ago | 0

Answered
Why my results of regress function and fitlm function are different?
I don't see that...I'm guessing a different y vector, somehow, maybe??? x=[1 2 3 4 5 6 7 8 9 10].'; y=[4 5 2 7 2 8 10 2 1 5].'...

7 dagar ago | 0

Answered
Looping through object array, possible to get an iterator to index into the object array?
"The MATLAB way" would be to write isConditon=(EvaluateLogicalExpressionOverTheRange); myObjectArray(isCondition)=[]; or the ...

7 dagar ago | 0

| accepted

Answered
Color Scatter plot based on values in another column
You can't use such a grouping as is, create a grouping variable... edges=[0.5 1.5:0.5:3.5 inf]; g=discretize(Z); hSC=scatter(...

7 dagar ago | 0

Answered
How Timelines Unify in subplot
fn1=websave('compound_tide_1516_data_wl_3.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1134780/compound_...

8 dagar ago | 0

Answered
Plot boxplot/boxchart outliers in different colors by goups
fn=websave('sub_table.mat','https://www.mathworks.com/matlabcentral/answers/uploaded_files/1134300/sub_table.mat'); load(fn) i...

9 dagar ago | 1

Answered
Is it possible to create such a Visualization in Matlab?
With all the amenities, it'll take a fair amount of effort, although one could undoubtedly create a crude replication of the wal...

9 dagar ago | 0

| accepted

Answered
How can I read rows from a CSV outside of datalines using readtable
"Do I just have to run textscan or readtable again to read those two lines separately?" Yes, unfortunately readtable doesn't ha...

9 dagar ago | 0

| accepted

Answered
How to find parent uifigure for a child several layers down
" I want to avoid having to pass the figure handle down through each layer." In an app, data are all global anyway, so save the...

9 dagar ago | 0

Answered
How can I change rows that appeared more than once to missing rows
A=[ 2005.00 1.00000 0.000000 0.000000 0.000000 2005.00 2.00000 0.000000 0.000000 0.000000 2...

9 dagar ago | 0

| accepted

Answered
Irregular Arrays for fixed.Interval Objects
Never heard of them, but never used/don't have the FixedPoint TB ... all my micro work occurred way before any of these toolsets...

10 dagar ago | 0

| accepted

Load more