Community Profile

photo

dpb


3,865 total contributions since 2012

Contact

dpb's Badges

  • Thankful Level 2
  • 36 Month Streak
  • Ace
  • Revival Level 1
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
How do I avoid scientific notation when using fprintf to print numbers into a text document?
If you want/need a specific format, say so... :) When you use '%d' for a floating point value, since it expects an integer valu...

약 1시간 ago | 0

Answered
How can I move the Xlabel without moving the X-Axis?
You've got to override the default position data for the label when move the axis location to center-- Ylm=ylim; ...

약 3시간 ago | 0

Answered
Polynomial equation not giving expected result
Just because the coefficient is small doesn't mean it isn't important...it is, after all the coefficient of x^5 and b=polyfit(...

약 12시간 ago | 0

| accepted

Answered
Determine if an array has any elements that are zero ?
function flg = isFullPoly(b) % isFullPoly(b) returns T if all coefficients, b, nonzero, F otherwise flg=all(b); end Thi...

1일 ago | 0

| accepted

Answered
How do I sort an array by only one column?
doc sortrows % ALWAYS read "See Also" when looking for related functions!!! >> help sort sort Sort in ascending or des...

1일 ago | 1

| accepted

Answered
How to analyze the relationship between my data in a survey
"Carefully!" :) So happens had reasons to think about this some recently -- a couple links I found of some use: https://www3....

2일 ago | 0

| accepted

Answered
read certain range in csv file and save to new file
Same basic solution but one can write the loop without an explicit loop -- of course, it could easily be found to be less effici...

2일 ago | 0

Answered
How to position added text in the graph at the upper right corner of the graph?
xL=xlim; yL=ylim; text(str,0.99*xL(2),0.99*yL(2),'HorizontalAlignment','right','VerticalAlignment','top')

3일 ago | 0

Answered
ERROR unable to convert 'string' value to 'int64'
Name Size Bytes Class Attributes HighTemp 4x1 16 int32 LowT...

3일 ago | 0

Answered
Tables: Transform Variablenames
...,'ReadVariableNames',0); % use the named parameters as needed See doc readtable Also, in general, doc detectImp...

3일 ago | 1

Answered
Smoothing multiple files and save it into new file
See FAQ https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F I'm particularly fond of the dir() solution...

3일 ago | 0

Answered
ERROR unable to convert 'string' value to 'int64'
Yr = 1900 + Yr; fileNew = fopen(newFileName,'w'); Mnth = string(Mnth); T = [Yr Mnth LowTemp HighTemp Precip]; You've got a n...

4일 ago | 0

Answered
I'm wanting to change my formatting to scientific and output values in a table
Your table isn't what you think it is...study the output carefully and the orientation of the data in the table... HINT: You n...

4일 ago | 0

| accepted

Answered
how to perform xor of two bits in matab
See doc bitxor to do the logical operation on the content of the variable in its internal storage pattern; you can convert the...

4일 ago | 1

Answered
convert two columns( one real number and the other is imaginary but without (i) symbol) in txt file to complex number and one column.
Use xlsread or what other import functions you care to use to read the data depending on how much of the header info you need, t...

4일 ago | 0

Answered
How to use an an if statement which has two criteria to be met to create a new table
>> W=[1 2 1 2 1 3 2 0 0 2].'; >> F=[0 0 2 2 0 0 3 3 0 0].'; >> ix=(W<2) | (W>1 & F>0); >> [W(ix) F(ix)] ans = 1 0 ...

5일 ago | 1

Answered
Read multiple csv and plot
formatSpec = '%s%s%s%s%s%s%s%s%s%s%s'; csv_dir = uigetdir(' '); d=dir(fullfile(csv_dir, '*.csv')); for i=1:numel(file_list) ...

5일 ago | 0

| accepted

Answered
How to get data from file to matrix?
>> A=importdata('ionos.txt'); >> whos A Name Size Bytes Class Attributes A 351x35 ...

6일 ago | 1

| accepted

Answered
Create a folder and save it with a field name
>> newfoldername=['newfolder_' DATA.Site]; mkdir(fullfile('C:\MicrogridDesignTool\Projects',newfoldername')) Error using fullf...

6일 ago | 0

Answered
Create a folder and save it with a field name
Would be easier to see the actual struct via whos DATA to ensure we follow the actual construction, but basically if Data.Sit...

6일 ago | 0

Answered
why the coordinates start from 800. want it to start from 0 . and the origin point in the left down like usual.
imshow by default uses size() of the image x- and y- dimensions +/-0.5 as the axis x- and y-limits. The data are plotted on the...

7일 ago | 0

Answered
How to add multiple graphs onto one graph
And what, specifically, is wrong with ... code that generates x,y line 1 code that generates x,y line 2 code that generates ...

7일 ago | 0

| accepted

Answered
How to generate a file name by combining variable characters based on the input of the matlab?
You're on right track... fmt= 'output_file_%s_value%0.2f_%03d_s%03d.txt'; % use fixed width with leading zeros so will sort nu...

7일 ago | 0

Answered
Compare to rows and delete matching rows
[~,ib]=ismember(A,B(:,1)); B(ib,:)=[];

8일 ago | 0

| accepted

Answered
Add les than or equal to inequality to my legend
xlabel('3\geq2') ylabel('2\leq3') See section link to 'TeX' interpreter at doc text TMW could make it easier to find from t...

8일 ago | 0

| accepted

Answered
Making date regular in timetable
Q1. Because you created a timetable with the time vector that is last day of each calendar quarter month over a period of years...

8일 ago | 0

| accepted

Answered
How can I add label to each column to numeric matrix and write it to excel
xlswrite requires each cell of the output cell array contain either a string or a numeric; otherwise that cell will be silently ...

8일 ago | 0

Answered
Compile mulitple csv files into one large table
You're overwiting Data every iteration... source_dir = 'directory_name'; source_files = dir(fullfile(source_dir,'*.csv')); Da...

9일 ago | 0

Answered
How do I make a legend for data organized into colours in a bar plot?
OK, with your data file... [Yield,Elements] = xlsread('test.xlsx'); [YS,iY]=sort(Yield,'descend'); % index to pl...

9일 ago | 1

| accepted

Answered
How do I make a legend for data organized into colours in a bar plot?
The bar plot/object in Matlab is a really, Really, REALLY difficult thing to work.with, unfortunately. A single bar plot has on...

9일 ago | 0

Load more