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

más de 7 años hace | 2

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 2

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

más de 7 años hace | 0

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

más de 7 años hace | 1

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

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

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

más de 7 años hace | 0

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 2

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 3

| aceptada

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

más de 7 años hace | 1

Respondida
moving files from one folder to an other
ix=10; % don't bury data inside code; use variables movefile(fullfile(f_raw(ix).folder,f_raw(ix).name),B)...

más de 7 años hace | 1

| aceptada

Respondida
how to place a legend in best corner?
Give this a try as a first cut...written for a one-line plot as is and takes the legend, axis handles. Generalized, it could ...

más de 7 años hace | 0

| aceptada

Respondida
adding legend that is comes from a variable
LEGEND() requires text, not numeric data for the legend text... hL=legend(num2str(eta(:),'%.4f')); % salt format string to...

más de 7 años hace | 2

| aceptada

Respondida
import textfile with both numbers and characters into array while skipping part of the file's content
With the above analysis of the file structure and ignoring the remainder of the file as there are also no delimiters other than ...

más de 7 años hace | 0

| aceptada

Cargar más