Answered

Split one CSV file in 4 parts

Don't you have the documentation that explains how the timestamps are encoded? Using these would be more reliable than reconstru...

Split one CSV file in 4 parts

Don't you have the documentation that explains how the timestamps are encoded? Using these would be more reliable than reconstru...

ein Tag ago | 0

Answered

How do I extract elements from a table according to specific conditions?

T1(:, T1.TargetStatus == 'N' & T1.Response == 'k') %select all rows for which TargetStatus is 'N' AND Response is 'k' Note th...

How do I extract elements from a table according to specific conditions?

T1(:, T1.TargetStatus == 'N' & T1.Response == 'k') %select all rows for which TargetStatus is 'N' AND Response is 'k' Note th...

ein Tag ago | 0

Answered

a script that joints multiple sheets in an Excel workbook

readtable (or readtimetable) the first two sheets, outerjoin them. Then readtable (or readtimetable) the remaining sheets one by...

a script that joints multiple sheets in an Excel workbook

readtable (or readtimetable) the first two sheets, outerjoin them. Then readtable (or readtimetable) the remaining sheets one by...

ein Tag ago | 0

Answered

OOP - convert base class object to sub class object

Th design you describe is fairly common and sounds sensible but I'm not entirely clear on the finer point, particularly on how t...

OOP - convert base class object to sub class object

Th design you describe is fairly common and sounds sensible but I'm not entirely clear on the finer point, particularly on how t...

ein Tag ago | 1

Answered

Undefined function or variable C

If this exactly the code you've been given without you having made any modification: function [PD,xDew]=PDew_Raoult(Ps,y,T) % ...

Undefined function or variable C

If this exactly the code you've been given without you having made any modification: function [PD,xDew]=PDew_Raoult(Ps,y,T) % ...

3 Tage ago | 1

Answered

While loop stops interating before end condition is met

there is always a delta of 0.001, except for counter = 11, so you would expect the while loop to end when counter = 11 is reache...

While loop stops interating before end condition is met

there is always a delta of 0.001, except for counter = 11, so you would expect the while loop to end when counter = 11 is reache...

3 Tage ago | 1

| accepted

Answered

How to dynamically construct a matrix of functions ?

If I understood correctly: function A = makeMatrix(Jc, Jf, x) %Jc: function handle to a function that takes scalar input x...

How to dynamically construct a matrix of functions ?

If I understood correctly: function A = makeMatrix(Jc, Jf, x) %Jc: function handle to a function that takes scalar input x...

3 Tage ago | 1

Answered

How to extract info from string using regexp?

This should work: filecontent = fileread('c:\somewhere\somefile'); polyid = regexp(filecontent, 'Polygon (\d+) id (\S+)', 'tok...

How to extract info from string using regexp?

This should work: filecontent = fileread('c:\somewhere\somefile'); polyid = regexp(filecontent, 'Polygon (\d+) id (\S+)', 'tok...

4 Tage ago | 0

| accepted

Answered

how to multiply every single number in an array to another array

Assuming that all the other values are scalar and that you're on R2016b or later, make omega a column vector and time a row vect...

how to multiply every single number in an array to another array

Assuming that all the other values are scalar and that you're on R2016b or later, make omega a column vector and time a row vect...

4 Tage ago | 0

Answered

XMLwrite involuntary wrapping of long tags - not behaving as it should (bug) - upgrade from 2018a

and I have relied myself upon this, no wrong in that Well, you're relying on undocumented behaviour. It's always risky and you ...

XMLwrite involuntary wrapping of long tags - not behaving as it should (bug) - upgrade from 2018a

and I have relied myself upon this, no wrong in that Well, you're relying on undocumented behaviour. It's always risky and you ...

4 Tage ago | 1

Answered

Follow up: How can I merge two different tables using the first column in common?

The question is a bit confusing. Tables are mentioned in the title, but the examples are matrices. Two tables is mentioned in th...

Follow up: How can I merge two different tables using the first column in common?

The question is a bit confusing. Tables are mentioned in the title, but the examples are matrices. Two tables is mentioned in th...

4 Tage ago | 0

Answered

Index exceeds matrix dimensions error on reading predicting image files

I don't see anything surprising about that error. You have written pics=dir(fullfile(img,'*_predict.bmp')); So pics is the lis...

Index exceeds matrix dimensions error on reading predicting image files

I don't see anything surprising about that error. You have written pics=dir(fullfile(img,'*_predict.bmp')); So pics is the lis...

6 Tage ago | 0

Answered

Simplification of creating new variables in a loop from preset array names

Embedding metadata in variable names is a sure way of creating complex and buggy code. See Tutorial: why variables should not be...

Simplification of creating new variables in a loop from preset array names

Embedding metadata in variable names is a sure way of creating complex and buggy code. See Tutorial: why variables should not be...

6 Tage ago | 2

| accepted

Answered

How to run a Power Point Macro from MATLAB?

It should be as simple as: powerpoint = actxserver('Powerpoint.Application'); %if you want to see the powerpoint window: %pow...

How to run a Power Point Macro from MATLAB?

It should be as simple as: powerpoint = actxserver('Powerpoint.Application'); %if you want to see the powerpoint window: %pow...

6 Tage ago | 1

| accepted

Answered

Creating timetable from excel for rainfall data

Considering that excel has a perfectly working date/time time, one must wonder why you're not using it. At least, encoding the d...

Creating timetable from excel for rainfall data

Considering that excel has a perfectly working date/time time, one must wonder why you're not using it. At least, encoding the d...

6 Tage ago | 0

| accepted

Answered

How to read and print text cell by cell in csv file ?

The brackets around csvread are useless clutter. rows is not a valid matlab function. endfor is not a valid matlab statement. ...

How to read and print text cell by cell in csv file ?

The brackets around csvread are useless clutter. rows is not a valid matlab function. endfor is not a valid matlab statement. ...

6 Tage ago | 0

Answered

Receive negative number from HC-05

I don't have the fixed-point toolbox but I would suspect that bitsll returns an 8 bit integer if the input is 8 bit. You say yo...

Receive negative number from HC-05

I don't have the fixed-point toolbox but I would suspect that bitsll returns an 8 bit integer if the input is 8 bit. You say yo...

6 Tage ago | 0

Answered

Re-enable a callback function

Probably, the simplest thing would be to prevent the error being detected and hence the callback from being disabled. For that I...

Re-enable a callback function

Probably, the simplest thing would be to prevent the error being detected and hence the callback from being disabled. For that I...

7 Tage ago | 0

| accepted

Answered

Error using vertcat Dimensions of matrices being concatenated are not consistent.

At least, one of the expressions in your F does not return a scalar. To find which one, you will have to try each one individual...

Error using vertcat Dimensions of matrices being concatenated are not consistent.

At least, one of the expressions in your F does not return a scalar. To find which one, you will have to try each one individual...

8 Tage ago | 0

| accepted

Answered

matrix insert with a condition

A = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

matrix insert with a condition

A = [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

8 Tage ago | 0

| accepted

Answered

How to write the matlab command for creating the nested structures ?

In my opinion, you're better off sticking with what you have. It's a lot clearer than the one-liner. If you really want the one-...

How to write the matlab command for creating the nested structures ?

In my opinion, you're better off sticking with what you have. It's a lot clearer than the one-liner. If you really want the one-...

8 Tage ago | 0

| accepted

Answered

extract data for a specified date and time period

Screenshots are useless. We can't test code on screenshots, we can't open screenshots to see what the actual formatting is. Atta...

extract data for a specified date and time period

Screenshots are useless. We can't test code on screenshots, we can't open screenshots to see what the actual formatting is. Atta...

8 Tage ago | 2

| accepted

Answered

Find the earliest common date and indicator of two date vectors.

intersect will give you all the dates common to a and b. By default, it also sorts them, so the first of these will be the earli...

Find the earliest common date and indicator of two date vectors.

intersect will give you all the dates common to a and b. By default, it also sorts them, so the first of these will be the earli...

9 Tage ago | 1

| accepted

Answered

How can I fix the error in the given code? About 'inline'

As pointed out by Stephen, inline is deprecated, due to be removed soon from matlab. You'd be better off using an anonymous func...

How can I fix the error in the given code? About 'inline'

As pointed out by Stephen, inline is deprecated, due to be removed soon from matlab. You'd be better off using an anonymous func...

9 Tage ago | 0

Answered

About Computing sequence.

matrices operations in matlab are very optimised, so it's likely that they are parallelised as much as possible. However, implem...

About Computing sequence.

matrices operations in matlab are very optimised, so it's likely that they are parallelised as much as possible. However, implem...

9 Tage ago | 0

| accepted

Answered

How to insert an unknown number of coloumn in a Matrix?

It's hard to tell you a generic way without understanding how the insertion points are chosen. In your first case, I would do: ...

How to insert an unknown number of coloumn in a Matrix?

It's hard to tell you a generic way without understanding how the insertion points are chosen. In your first case, I would do: ...

9 Tage ago | 0

Answered

How to create sub images of a main image?

%inputs: %img: a full colour (3D), or greyscale image (2D) %blocksize: a 2-element vector giving the height and width of each ...

How to create sub images of a main image?

%inputs: %img: a full colour (3D), or greyscale image (2D) %blocksize: a 2-element vector giving the height and width of each ...

9 Tage ago | 0

Answered

Fourier Transform for xlsx files from excel

Read the content of the file with readmatrix (R2019a only), readtable, or xlsread and pass whatever it is you want from that to ...

Fourier Transform for xlsx files from excel

Read the content of the file with readmatrix (R2019a only), readtable, or xlsread and pass whatever it is you want from that to ...

9 Tage ago | 0

Answered

How to work with function inputs which are structures with different fields

By definition, the fields of each structure element of a structure array are all the same. The field names are a property of the...

How to work with function inputs which are structures with different fields

By definition, the fields of each structure element of a structure array are all the same. The field names are a property of the...

9 Tage ago | 0

| accepted

Answered

Can you extract an element from an array in the same line as you create the array?

No, unfortunately in matlab, you cannot index directly into the return value of a function. You could use subsref as demonstra...

Can you extract an element from an array in the same line as you create the array?

No, unfortunately in matlab, you cannot index directly into the return value of a function. You could use subsref as demonstra...

9 Tage ago | 1

| accepted