Answered

Why is my table displaying 1x1 in workspace but displays actual values in command window?

months = (datetime(1961,01,01):calmonths(1):datetime(2022,06,30)).'; a = table(randn(size(months))); TB = a(1:end,1); whos mo...

Why is my table displaying 1x1 in workspace but displays actual values in command window?

months = (datetime(1961,01,01):calmonths(1):datetime(2022,06,30)).'; a = table(randn(size(months))); TB = a(1:end,1); whos mo...

16 dagar ago | 0

Answered

I have two matrices the same size 'F1result' and 'F2result'. I need to compare them element by element and create a new matrices 'F' with whichever value is greater.

F=max(F1,F2);

I have two matrices the same size 'F1result' and 'F2result'. I need to compare them element by element and create a new matrices 'F' with whichever value is greater.

F=max(F1,F2);

17 dagar ago | 0

| accepted

Answered

Units type 'characters' not suppoerted for uitable on uifigure

Indeed, TMW changed the documentation to try to force the use of uifigure instead of figure it appears, and in doing so rearrang...

Units type 'characters' not suppoerted for uitable on uifigure

Indeed, TMW changed the documentation to try to force the use of uifigure instead of figure it appears, and in doing so rearrang...

17 dagar ago | 1

| accepted

Answered

Codes (activex..) for Copy graphs (figure) from Matlab to Excel

I can't believe this ever worked -- there's been no file associated with the COM object in this code by itself. Unless the conn...

Codes (activex..) for Copy graphs (figure) from Matlab to Excel

I can't believe this ever worked -- there's been no file associated with the COM object in this code by itself. Unless the conn...

17 dagar ago | 0

Answered

Plot 3 axis from Excel

Q=readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1127410/Heat%20exchange.xlsx'); Tin=Q(1,2:end);Tou...

Plot 3 axis from Excel

Q=readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1127410/Heat%20exchange.xlsx'); Tin=Q(1,2:end);Tou...

18 dagar ago | 1

Answered

I am receiving error for the following code , but I can't understand where and what to change I am having error at 5th line

You forgot to attach the error message in context or to even give us a klew what raw contents are...but, taking a guess as to wh...

I am receiving error for the following code , but I can't understand where and what to change I am having error at 5th line

You forgot to attach the error message in context or to even give us a klew what raw contents are...but, taking a guess as to wh...

19 dagar ago | 0

Answered

How do I plot an image in Log-Log axis?

... h = imagesc(usl,usg,P); hAx=gca; set(hAx,{'XScale','YScale'},{'log','log'})

How do I plot an image in Log-Log axis?

... h = imagesc(usl,usg,P); hAx=gca; set(hAx,{'XScale','YScale'},{'log','log'})

20 dagar ago | 0

| accepted

Answered

How to set different marker and marker edgecolor on single line in Plot?

plot is a single object for each line -- ergo, each line can have only one linestyle (colors, marker, line). To have a second m...

How to set different marker and marker edgecolor on single line in Plot?

plot is a single object for each line -- ergo, each line can have only one linestyle (colors, marker, line). To have a second m...

20 dagar ago | 0

| accepted

Answered

Read csv with quotes and datetime stamp (readtable configuration)

readtable will import the file time field as a datetime variable automagically; you don't need to do anything except read it. Y...

Read csv with quotes and datetime stamp (readtable configuration)

readtable will import the file time field as a datetime variable automagically; you don't need to do anything except read it. Y...

21 dagar ago | 1

Answered

Extracting time valued between lower and upper bound

>> tmp=a(1:10,[end-2:end]) % look at a sample of the pertinent data ans = 10×3 table datetime ...

Extracting time valued between lower and upper bound

>> tmp=a(1:10,[end-2:end]) % look at a sample of the pertinent data ans = 10×3 table datetime ...

22 dagar ago | 0

| accepted

Answered

Cell Array Conversion to a Numeric Array by using a loop

You can try m=cellfun(@(x)movmean(x,3),TECs,'UniformOutput',0); If the content of TECs is an array of double arrays, you'll ge...

Cell Array Conversion to a Numeric Array by using a loop

You can try m=cellfun(@(x)movmean(x,3),TECs,'UniformOutput',0); If the content of TECs is an array of double arrays, you'll ge...

23 dagar ago | 0

Answered

How to pass textscan data to array?

OK, with the multiple-line header, and parsing it, the code isn't so bad, after all... :) I'd probably still do a little differ...

How to pass textscan data to array?

OK, with the multiple-line header, and parsing it, the code isn't so bad, after all... :) I'd probably still do a little differ...

25 dagar ago | 1

| accepted

Answered

Changing Function number every loop

Seems would be just call it in a loop or even with arrayfun... search='c'; target='y'; N=[4:4:16].'; ret=arrayfun(@(n)Target...

Changing Function number every loop

Seems would be just call it in a loop or even with arrayfun... search='c'; target='y'; N=[4:4:16].'; ret=arrayfun(@(n)Target...

25 dagar ago | 0

| accepted

Answered

filtering excel commands in matlab

tA=readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1121415/animals.xlsx'); tA=convertvars(tA,@iscells...

filtering excel commands in matlab

tA=readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1121415/animals.xlsx'); tA=convertvars(tA,@iscells...

25 dagar ago | 0

Answered

How can i extract data from data from table using a string of words.

data_table=readtable("Normal and Tumor TPM.xlsx","Sheet","Normal Expression","VariableNamingRule","preserve"); geneslist=strt...

How can i extract data from data from table using a string of words.

data_table=readtable("Normal and Tumor TPM.xlsx","Sheet","Normal Expression","VariableNamingRule","preserve"); geneslist=strt...

26 dagar ago | 1

Answered

Changing colors for findpeaks function

Sure, but not with the triplet form of plot to use anything except the named colors... hL=plot(x,y,'-', pk,loc,'*'); ...

Changing colors for findpeaks function

Sure, but not with the triplet form of plot to use anything except the named colors... hL=plot(x,y,'-', pk,loc,'*'); ...

26 dagar ago | 0

Answered

I want to make, MATLAB can log in by for number of people and use the software (but not simultaneously).

You should contact your site manager or, if you are the site rep, contact Sales at TMW for install support. Your last sentenc...

I want to make, MATLAB can log in by for number of people and use the software (but not simultaneously).

You should contact your site manager or, if you are the site rep, contact Sales at TMW for install support. Your last sentenc...

27 dagar ago | 1

Answered

Plot matrix dependent on x against x

You can/could try surf with X,Y the ordinal vectors 1:9 and Z-->CMR. Use hold on to add for each x to add to the same plot; if ...

Plot matrix dependent on x against x

You can/could try surf with X,Y the ordinal vectors 1:9 and Z-->CMR. Use hold on to add for each x to add to the same plot; if ...

27 dagar ago | 0

Answered

How to convert a long txt sequence of single digit numbers (e.g. '100101011101010111...') to number array?

s = '1000011110'; n = sscanf(s,'%1d') Probably fastest. Or you can compare s = '1000011110'; n =str2num(s.') If the string...

How to convert a long txt sequence of single digit numbers (e.g. '100101011101010111...') to number array?

s = '1000011110'; n = sscanf(s,'%1d') Probably fastest. Or you can compare s = '1000011110'; n =str2num(s.') If the string...

27 dagar ago | 1

| accepted

Answered

imhist and histogram giving different results

For <imhist>, the n bins of the histogram are each half-open intervals computed for a double as you've passed as (p−1.5)/(n−1) ...

imhist and histogram giving different results

For <imhist>, the n bins of the histogram are each half-open intervals computed for a double as you've passed as (p−1.5)/(n−1) ...

27 dagar ago | 0

| accepted

Answered

How to precisely place textarrow?

This has always been a pain in the royal patootie...the annotaton objects are in figure coordinates while the data inside the pl...

How to precisely place textarrow?

This has always been a pain in the royal patootie...the annotaton objects are in figure coordinates while the data inside the pl...

27 dagar ago | 0

| accepted

Answered

How to save data to existing excel file

OK, had a few more minutes -- as @Cris LaPierre (and I had also) suggests, it would be a somewhat simpler job to build the table...

How to save data to existing excel file

OK, had a few more minutes -- as @Cris LaPierre (and I had also) suggests, it would be a somewhat simpler job to build the table...

28 dagar ago | 0

| accepted

Answered

Want to correct experimental data using a black box non-linear model of the data

Look into Kalman filters...

Want to correct experimental data using a black box non-linear model of the data

Look into Kalman filters...

28 dagar ago | 0

| accepted

Answered

How to save data to existing excel file

You didn't define cellReference before trying to use it in the else clause if the file didn't exist. Must not have executed tha...

How to save data to existing excel file

You didn't define cellReference before trying to use it in the else clause if the file didn't exist. Must not have executed tha...

28 dagar ago | 0

Answered

Turn all excel sheet background to white

<docs.microsoft.com/...vba/api/excel.worksheet.usedrange>

Turn all excel sheet background to white

<docs.microsoft.com/...vba/api/excel.worksheet.usedrange>

28 dagar ago | 0

Answered

How to create different Plots for different functions while each function has been plotted using hold on

%enthalpy plot (KJ/mol Vs Bar)- hold on; for t = 1:nt %varying temperature to create isotherms for p = 1:np ...

How to create different Plots for different functions while each function has been plotted using hold on

%enthalpy plot (KJ/mol Vs Bar)- hold on; for t = 1:nt %varying temperature to create isotherms for p = 1:np ...

29 dagar ago | 1

| accepted

Answered

change output from row to column and display one cell value instead of multiple

[locAll,typeAll]=find(mVocs==1) will return two vectors of the row,column indices (that you've inexplicably called loc/typeAll...

change output from row to column and display one cell value instead of multiple

[locAll,typeAll]=find(mVocs==1) will return two vectors of the row,column indices (that you've inexplicably called loc/typeAll...

29 dagar ago | 1

| accepted

Answered

How to locate the the difference between the max. and min in matrix rows

M=[ 2 4 7 10 28; 1 3.6 8 11 27; 0.5 5 9.5 13 32].'; D=range(M,2) Almost never need loops in MATLAB for such...

How to locate the the difference between the max. and min in matrix rows

M=[ 2 4 7 10 28; 1 3.6 8 11 27; 0.5 5 9.5 13 32].'; D=range(M,2) Almost never need loops in MATLAB for such...

29 dagar ago | 0

Answered

How do I make a vector of fitted values and a vector of residual values from a linear model of y on x

As per the above comment, if you have either of the toolboxes, I'd recommend using one of those routines instead, but to get by ...

How do I make a vector of fitted values and a vector of residual values from a linear model of y on x

As per the above comment, if you have either of the toolboxes, I'd recommend using one of those routines instead, but to get by ...

30 dagar ago | 0

| accepted

Answered

How to use the values of an array as inputs for a function?

Well, it would be easier if the function were written to accept an array instead of the six different variables -- but, you can ...

How to use the values of an array as inputs for a function?

Well, it would be easier if the function were written to accept an array instead of the six different variables -- but, you can ...

ungefär en månad ago | 0

| accepted