Community Profile

photo

Struggling in MATLAB


Last seen: Today Attivo dal 2021

Programming Languages:
Python, C, Java, MATLAB
Spoken Languages:
Bengali, English, Hindi, Spanish
Professional Interests:

Statistics

All
  • Thankful Level 4
  • Solver

Visualizza badge

Content Feed

Visto da

Domanda


How to use error handler for arrayfun?
I am trying to apply a function to an big array. The output is a logical output. I checked that this arrayfunction is working fo...

1 giorno fa | 1 risposta | 0

1

risposta

Domanda


How do I exit a for loop after logical index is found true in an array?
I would like to exit a loop if the result is set to true in the for loop. But it always returns false if I use 'continue'. How d...

1 giorno fa | 2 risposte | 0

2

risposte

Risposto
How to add legend to the Figure?
I made patches of same color as rectangle to add legends for them. Also added handle to plot functions to make it uniform with ...

2 giorni fa | 0

| accettato

Domanda


How to add legend to the Figure?
I have a plot for which I am trying add legends. I am trying to add the shaded rectangles as well in legend. Please note that th...

3 giorni fa | 1 risposta | 0

1

risposta

Risposto
How to write database query using sprintf command?
I was finally able to solve this by separating '%s' and 'LIKE' in the query string. Here is the code attached. referencetime =...

12 giorni fa | 0

| accettato

Domanda


How to write database query using sprintf command?
I have a POSTGRESQL database from which has a column named 'referencetime' which is a timestamp. (e.g. '04/06/2022 12:41:46.5')....

13 giorni fa | 1 risposta | 0

1

risposta

Domanda


Can I return 'nan' value for bad data?
I am writing an algorithm for a big database. I am running the algorithm in a for loop over the database trials. My algorithm wo...

21 giorni fa | 1 risposta | 0

1

risposta

Domanda


How to extract table rows based on a column entry (string) which match a pattern?
I have table where health column contains has similar values, like '1 Hour Saline', '2 Hour Saline', '2 hour Saline', '3 Hour S...

circa 2 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to label X-axis on bar graph?
I want to label a bar graph with a string array. I am using this following piece of code to label them. But it can not convert c...

circa 2 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to set y axis limit same for 2 subplots in a figure object?
I am creating a multiple figure object in a loop, I named it h. (h = figure) Each h contains two subplots. For both subplots in ...

2 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to find the maximum value by comparing 2 cells?
I have 2 cells array, for example A = {2,4,5}; B = {1,10}; How can I find the max value (10, in this case) by comapring cell ...

2 mesi fa | 1 risposta | 0

1

risposta

Risposto
Why sqlwrite not uploading all columns of the Matlab table to database?
This happened because the columns which did not upload has datatype cell. So, if we convert to string we can upload them.

3 mesi fa | 0

| accettato

Domanda


Why sqlwrite not uploading all columns of the Matlab table to database?
I am trying to upload a table to postgresql database. I have attached the table. I am using sqlwrite(conn,tablename,data); Bu...

3 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to group different values in an array?
I have a test column array which contains 4 unique values? I have attached the array. intensityofcostcomposition _____...

4 mesi fa | 2 risposte | 0

2

risposte

Domanda


How set table column to modified data?
I am performing same set of operations for all the columns in a table. How do I use a for loop over all the columns for this? I ...

4 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to map one array elements to another array elements?
I have an output array which shows to which feeder the animal goes in each trial for 6 trials. There could be only 4 feeders(1,2...

4 mesi fa | 2 risposte | 0

2

risposte

Domanda


How to use regex to obtain double values?
I have an array of strings which contains some units. I have attahced the array. unq = ["10 lux";"10lux";"15";"15.0";"15.5 ...

4 mesi fa | 1 risposta | 0

1

risposta

Domanda


How do I assign result array of a loop to a variable name?
I have a for loop which gives an one dimensional array in each iteration. (i.e. [1;2;3;4]) But they could be different in length...

4 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to upload cell data to PostgreSQL database table?
I am trying to upload a MATLAB table to PostgreSQL database. But the columns which contain cell datatypes are not showing up in ...

5 mesi fa | 0 risposte | 0

0

risposte

Domanda


How to upload an array of double in postgreSQL?
I have a table in which different columns contain different types of data. I want to upload the table to postgreSQL database. I ...

5 mesi fa | 0 risposte | 0

0

risposte

Domanda


How to remove bulbs in the mouse trajectory?
I am trying to remove the bulbs in red circles in the picture to get a smooth trajectory as shown in the picture. The mouse may...

5 mesi fa | 2 risposte | 0

2

risposte

Domanda


Why 'NaT' (class: datetime) does not work with find function?
I have a table part of which is attached. The enries in the date column are as datetime. I am trying to get the id where the ent...

5 mesi fa | 2 risposte | 0

2

risposte

Domanda


Why am I getting error "Vectors must be the same length" although they are of same length?
I am trying to plot a X,Y graph. I am getting an error "Vectors must be the same length", although I see in the workspace that t...

6 mesi fa | 2 risposte | 0

2

risposte

Domanda


How to remove multiple outlier data in a rectangular maze?
I have this rodent x,y coordinates as described in the attached picture. There are some outliers in the data, I need to remove...

6 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to get NaN if the data is not in proper input format or missing?
I am running a function over each table rows. It is a big table and some of the entries are 'NaN' (class: 'double') or 'none' (c...

6 mesi fa | 1 risposta | 0

1

risposta

Risposto
How to run MATLAB function on each row of database?
The problem has been solved. I used a for loop for this. I imported the database as a table 'all_data'. loadfile = load('all_da...

6 mesi fa | 0

| accettato

Domanda


How to run MATLAB function on each row of database?
I have wrote a MATALAB function to get an output. I import the PostgreSQL database to MATLAB workspace and then work from there....

7 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to append values to an array in for loop?
rotation_time_by_direction = []; for i = 1:10:length(direction_table.rodent_RecordingTime)-10 direction_change = ones(1,10...

7 mesi fa | 1 risposta | 0

1

risposta

Domanda


How to detect rotation in a trajectory?
I have to write an algorithm to detect rotation in the trajectory. Basically, I have to detect the red zone in the trajectory. C...

7 mesi fa | 2 risposte | 0

2

risposte

Risposto
How to convert PgArray to Matlab array?
This piece of code will convert PGArray data to double all_coordinatetimes = cell(length(data_on_date.coordinatetimes),1); for...

8 mesi fa | 0

| accettato

Carica altro