Answered

Find cells with specific condition

First of all, not all elements of condition contain two elements so you'll have to special-case those or fix that anomaly. Use ...

Find cells with specific condition

First of all, not all elements of condition contain two elements so you'll have to special-case those or fix that anomaly. Use ...

circa 11 ore ago | 0

Answered

char to double data type

Deprecated (and not recommended) would be dn=datenum(yourdatechararray,'dd-mmm-yyyy'); which, of course, returns the datenum a...

char to double data type

Deprecated (and not recommended) would be dn=datenum(yourdatechararray,'dd-mmm-yyyy'); which, of course, returns the datenum a...

circa 14 ore ago | 0

Answered

How can I make different plots of each row on Matlab and then grab the linear equation of each graph?

data=readmatrix('isochronedata.xlsx','Sheet','Sheet10_'); bv = data(:,5); mass = data(:,2); for i=2:2:numel(bv) %...

How can I make different plots of each row on Matlab and then grab the linear equation of each graph?

data=readmatrix('isochronedata.xlsx','Sheet','Sheet10_'); bv = data(:,5); mass = data(:,2); for i=2:2:numel(bv) %...

1 giorno ago | 0

Answered

Correct Axis Not Used

Move the xlim, ylim calls to the end of the function makeNyquist The plotting commands after the limits end up autoscaling agai...

Correct Axis Not Used

Move the xlim, ylim calls to the end of the function makeNyquist The plotting commands after the limits end up autoscaling agai...

2 giorni ago | 0

Answered

How do I plot multiple lines of best fit on a scatter plot?

All of Fit1 = polyfit(x1,y1,1); plot(polyval(Fit1,x1)); should be Fit1 = polyfit(x1,y1,1); plot(x1,polyval(Fit1,x1)); You ...

How do I plot multiple lines of best fit on a scatter plot?

All of Fit1 = polyfit(x1,y1,1); plot(polyval(Fit1,x1)); should be Fit1 = polyfit(x1,y1,1); plot(x1,polyval(Fit1,x1)); You ...

7 giorni ago | 0

Question

Running MATLAB script from Excel that uses COM itself by user without MATLAB

Have a Matlab function that reads one Excel workbook worksheet and then writes data from it into specific locations after doing ...

23 giorni ago | 0 answers | 0

Answered

What is missing from MATLAB #2 - the next decade edition

Editor won't restrict a substituion to selected area...best it knows of is the function. Uncool in the max! I'm now having to ...

What is missing from MATLAB #2 - the next decade edition

Editor won't restrict a substituion to selected area...best it knows of is the function. Uncool in the max! I'm now having to ...

circa un mese ago | 1

Answered

What is missing from MATLAB #2 - the next decade edition

A ready-built insertion method for tables, arrays, etc., so don't have to do all the under-the-hood indexing manually...given an...

What is missing from MATLAB #2 - the next decade edition

A ready-built insertion method for tables, arrays, etc., so don't have to do all the under-the-hood indexing manually...given an...

circa 2 mesi ago | 0

Answered

Stacked bar chart and writing value inside each bar and a value in top of the bar

numNearbyCHs=20; A=randi([100,1000],numNearbyCHs,1); B=randi([100,300],numNearbyCHs,1); C=randi([2,30],numNearbyCHs,1); D=ra...

Stacked bar chart and writing value inside each bar and a value in top of the bar

numNearbyCHs=20; A=randi([100,1000],numNearbyCHs,1); B=randi([100,300],numNearbyCHs,1); C=randi([2,30],numNearbyCHs,1); D=ra...

circa 2 mesi ago | 0

| accepted

Answered

Error using cat: Dimensions of matrices being concatenated are not consistent.

latitude = [-3.63965:-0.00898:-8.12601]; longitude = [-37.5098:0.00906:-32.9831]; str='/home/pink/Documents'; folder_name =...

Error using cat: Dimensions of matrices being concatenated are not consistent.

latitude = [-3.63965:-0.00898:-8.12601]; longitude = [-37.5098:0.00906:-32.9831]; str='/home/pink/Documents'; folder_name =...

circa 2 mesi ago | 0

Answered

Looping through a random matrix to see if any element is >0.5

random_number_matrix = rand(4,8); isGt=(random_number_matrix>0.5); display(random_number_matrix(isGt))

Looping through a random matrix to see if any element is >0.5

random_number_matrix = rand(4,8); isGt=(random_number_matrix>0.5); display(random_number_matrix(isGt))

circa 2 mesi ago | 0

Answered

How can I create a matrix composed of some data in another matrix?

"...in this new matrix data with a first data being in the cell located on line 5 then the following data is 4 lines below the f...

How can I create a matrix composed of some data in another matrix?

"...in this new matrix data with a first data being in the cell located on line 5 then the following data is 4 lines below the f...

circa 2 mesi ago | 0

| accepted

Answered

Startup On Network Drive Install

Well, I don't know exactly how or why, but the symptoms have now gone away -- I guess a couple restarts and resaving the default...

Startup On Network Drive Install

Well, I don't know exactly how or why, but the symptoms have now gone away -- I guess a couple restarts and resaving the default...

circa 2 mesi ago | 0

Question

Startup On Network Drive Install

This may be futile here, but I'll give it a go before bugging TMW Tech Support... I'll begin with the caveat I really don't fol...

circa 2 mesi ago | 2 answers | 0

Answered

changing the date format in matlab

>> dt=datetime(ds(1:10),'InputFormat','dd/MM/yyyy','Format','yyyy''Q''Q') dt = 10×1 datetime array 1947Q2 1947Q3 ...

changing the date format in matlab

>> dt=datetime(ds(1:10),'InputFormat','dd/MM/yyyy','Format','yyyy''Q''Q') dt = 10×1 datetime array 1947Q2 1947Q3 ...

circa 2 mesi ago | 0

| accepted

Answered

How to display text in a plot as scientific number

Use a format string to create specific format desired... >> sprintf('%.2e',pi*1E6) ans = '3.14e+06' ergo, use text(x,y,...

How to display text in a plot as scientific number

Use a format string to create specific format desired... >> sprintf('%.2e',pi*1E6) ans = '3.14e+06' ergo, use text(x,y,...

circa 2 mesi ago | 0

| accepted

Answered

Identifying and keeping duplicates but with a suffix

OK, this isn't complete, but is probably the simplest way to build something to do what you'd like -- it would need to be refine...

Identifying and keeping duplicates but with a suffix

OK, this isn't complete, but is probably the simplest way to build something to do what you'd like -- it would need to be refine...

circa 2 mesi ago | 0

Answered

Identifying and keeping duplicates but with a suffix

OK, that helps...actually, that's not too hard and even easier than the grouped solution -- I don't quite follow what your data ...

Identifying and keeping duplicates but with a suffix

OK, that helps...actually, that's not too hard and even easier than the grouped solution -- I don't quite follow what your data ...

circa 2 mesi ago | 0

| accepted

Answered

Insert lines in grouped bar plots

Good start but mixed metaphors...plot as numeric; use the categories as labels... ADDENDUM: Without creating the second array ...

Insert lines in grouped bar plots

Good start but mixed metaphors...plot as numeric; use the categories as labels... ADDENDUM: Without creating the second array ...

circa 2 mesi ago | 0

Answered

Get certain matrix entries to a new matrix

Sometimes, just "dead ahead" is as good as any... nAdd=sum(A~=0,2)-2; % number of connections beyond the one fo...

Get certain matrix entries to a new matrix

Sometimes, just "dead ahead" is as good as any... nAdd=sum(A~=0,2)-2; % number of connections beyond the one fo...

circa 2 mesi ago | 0

| accepted

Answered

How to extract data points from a .fig scatter plot?

openfig('YourFigFile.fig') hSc=findobj(gcf,'Type','scatter'); .X|Y|ZData properties are available from the scatter object hand...

How to extract data points from a .fig scatter plot?

openfig('YourFigFile.fig') hSc=findobj(gcf,'Type','scatter'); .X|Y|ZData properties are available from the scatter object hand...

circa 2 mesi ago | 0

| accepted

Answered

Help creating a homogenous array when one or more columns has data type 'cell'

I'm guessing here, but try for i=1:width(t) if iscell(t{:,i}) t.(t.Properties.VariableNames{2})=cell2mat(t{:,2}); en...

Help creating a homogenous array when one or more columns has data type 'cell'

I'm guessing here, but try for i=1:width(t) if iscell(t{:,i}) t.(t.Properties.VariableNames{2})=cell2mat(t{:,2}); en...

2 mesi ago | 0

Answered

How to insert file name into an array?

str='../Documents/'; folder_name = uigetdir(str); d=dir(fullfile(folder_name,'*.dat')); for i = 1: length(files); fid=fope...

How to insert file name into an array?

str='../Documents/'; folder_name = uigetdir(str); d=dir(fullfile(folder_name,'*.dat')); for i = 1: length(files); fid=fope...

2 mesi ago | 0

Answered

Percentage of data in given range

Not a defined function, no. There are a couple of related in the Statistics Toolbox for percentiles, etc., but not what you're ...

Percentage of data in given range

Not a defined function, no. There are a couple of related in the Statistics Toolbox for percentiles, etc., but not what you're ...

2 mesi ago | 1

| accepted

Answered

How to return in Matlab specific array according to certain scheme?

function ret=binrestore(m,array) % returns binary decoded array values from input encoded array % multiple Mapped Value = ...

How to return in Matlab specific array according to certain scheme?

function ret=binrestore(m,array) % returns binary decoded array values from input encoded array % multiple Mapped Value = ...

2 mesi ago | 1

| accepted

Answered

How to save a text file with headers?

function calibratedData = applyCal(fname,Ey,components,rawData,Calib) % applies calibration (gain and shift) to raw data; funct...

How to save a text file with headers?

function calibratedData = applyCal(fname,Ey,components,rawData,Calib) % applies calibration (gain and shift) to raw data; funct...

2 mesi ago | 0

| accepted

Answered

How to plot a graph along with axes graph?

Just build custom-placed subplot() axes...something like I=imread('ngc6543a.jpg'); % just an image to use later... f...

How to plot a graph along with axes graph?

Just build custom-placed subplot() axes...something like I=imread('ngc6543a.jpg'); % just an image to use later... f...

2 mesi ago | 0

| accepted

Answered

Plotting two data sets using the Curve Fitting Tool

Well, the old-fashioned way if all you wanted was the coefficients would be to use polyfit and polyval ...but since you have the...

Plotting two data sets using the Curve Fitting Tool

Well, the old-fashioned way if all you wanted was the coefficients would be to use polyfit and polyval ...but since you have the...

2 mesi ago | 0

| accepted

Answered

How can we write data into csv file with column labels included ?

... data1 = ones(1001,4); data2 = ones(125,7); data = {data1,data2}; ... You have created a disparate-sized array of 125 ro...

How can we write data into csv file with column labels included ?

... data1 = ones(1001,4); data2 = ones(125,7); data = {data1,data2}; ... You have created a disparate-sized array of 125 ro...

2 mesi ago | 0

Answered

How do I position a label below a colorbar?

You're almost there... hCB=colorbar; hCB.Title.String='Title'; set(hCB.XLabel,{'String','Rotation','Position'},{'XLabel',0,[0...

How do I position a label below a colorbar?

You're almost there... hCB=colorbar; hCB.Title.String='Title'; set(hCB.XLabel,{'String','Rotation','Position'},{'XLabel',0,[0...

2 mesi ago | 0

| accepted