Community Profile

photo

Vilém Frynta


CTU FBME

Active since 2022

bme

Programming Languages:
MATLAB
Spoken Languages:
English
Professional Interests:
Biomedical Engineering

Statistics

  • 3 Month Streak
  • Knowledgeable Level 3
  • Thankful Level 2
  • First Answer

View badges

Content Feed

View by

Answered
How to sort rows of a 2D array based on another array
Zdravím kolego, // Hello, I have tried something. I can't say it's "cleaner solution", but it's without for loop. You basically...

1 day ago | 0

Answered
I don't know how to make and algorithm to find BMI?
This looks like homework. Try creating a function. Inputs will be height and weight, and output will be the BMI. Some useful l...

1 day ago | 3

Answered
Change values in vectors
If you want to apply it to this vector, it's not complicated. But if you wanted to apply it to a more complex vector where the n...

14 days ago | 0

Answered
Remove NaN Entries in a Dataset
You do not need to go through every element of vector with for loop. You can use isnan on the vector, which will give you logic...

15 days ago | 0

| accepted

Answered
Operate with date and time string
% Your datetime as strings dt_event= '2021_04_23 16_58_14'; dt_site= '2021_04_23 17_00_18'; % Convert to datetime format d...

26 days ago | 0

| accepted

Answered
Merging the Data in the Text Files for the Number of "N" Text Files
Hey, there's a lot of ways to read text files. For your purposes, I think fileread and fscanf functions might do well. Then, y...

29 days ago | 0

| accepted

Answered
Sort a bank of ECG samples to 2 groups
Hello, as Star Strider already mentioned, you can filter data based on the R-amplitude and or heart rate (time between R–R). I...

29 days ago | 0

Answered
Why doesn't the for loop work?
x=1:16; p=isprime(x); x(p==0)=0; % Put zeros on the positions where p == 0 in vector X Is this what you wanted? ...

29 days ago | 0

| accepted

Question


Can't change xlabel font because of diacritics (č, ř, š, ...)
My language uses letters that use diacritics (č, ř, ž, ... ). I tried to change font in my Matlab script to Latin Modern Roman,...

1 month ago | 2 answers | 0

2

answers

Answered
Selection of a variable from a resulting equation
Hi, this could be done by using find() and indexing. If your table structure will always be the same (meaning that your first an...

2 months ago | 0

Answered
Rounding a decimal down
Example: X = 0.143; Y = sprintf('%.2f',X); Y = str2double(Y) Someone ahd same question before. Next time, try to Google y...

2 months ago | 0

Answered
I try reduce my matrix a single value for my input or a call a value
You can call value in vector by specifying it's position. mtx = [1, 2; 3, 4; 5, 6] Now you have to write matrix name (in my ex...

2 months ago | 0

Answered
finding the mean based on a specific value in other column
Find months that == 6 with function find(). Then use index of this function to get the temperatures. Then use mean() on these te...

2 months ago | 0

Answered
List all 6 whole number between -3.5 and 5.5
If I understand correctly, you can do it like this: a = -3.5; z = 5.5; aWhole = ceil(a) zWhole = floor(z) list = aWhole:...

2 months ago | 0

| accepted

Answered
Meging two tables with different numbers of Rows
Try: % Random data to work with DMax = [1 2 3 4 5]'; DMin = [0.1 0.2 0.3 0.4 0.5]'; DMaxInk = [11 22 33 44]'; DMinInk = [0....

2 months ago | 0

| accepted

Answered
How to make a line of fixed length?
You can specify length with numbers of your choice. You can specify direction numerically as well, you just need to use your im...

2 months ago | 0

Answered
I need help randomizing a triangle
try command rng https://www.mathworks.com/help/matlab/ref/rng.html for example rng("shuffle")

2 months ago | 0

Answered
How to pick group sum values from an array
I tried this: (converting into text, deleting zeros, then finding strings of ones and checking their length) but I have to go. ...

2 months ago | 0

Answered
I am trying to assign only positive integers to a variable.
Not sure if I understand correctly, but if you want to ignore the negative values, you can do: w = [1.8 -0.9 -0.9]' % your v...

2 months ago | 1

| accepted

Answered
Fill function with multiple variable inputs, being this different length arrays
I have 2 ideas. They do involve changing your function, just slightly. (1) Instead of "unpacking" your StructWithVectors into V...

2 months ago | 1

| accepted

Answered
How to insert picture 1 into picture 2?
Example: % Using random pictures that are part of Matlab img1 = imread("peacock.jpg"); % Smaller picture (792 x 1056) im...

2 months ago | 1

| accepted

Answered
split the name of a file (image .png)
My way to do so would be as follows: str1 = "name_of_figure_BN_102.png"; % Your input image name strPieces = strsplit(str1,"_"...

2 months ago | 0

| accepted

Answered
how to open 3D figure always from the same angle (not the angle it appears rn)?
When you are rotating the figure manually, there will be current azimut and elevation displayed. You need to click the "cube + a...

2 months ago | 0

| accepted

Answered
how to import a table generated in Matlab to powerpoint
I'd export your table using writetable(table, "table.xlsx") into .xlsx file and then proceed to manually import it into a Po...

3 months ago | 0

Answered
using a function in a for loop
I would recommend define your variables beforehand with zeros(). This way, you may avoid your brace indexing problem. Then you c...

3 months ago | 0

Question


How can I merge multiple cells in one row?
I have 2 cells. I need to put them both in a first row. First cell will be first, and the second cell will repeat n times after ...

9 months ago | 1 answer | 0

1

answer