Community Profile

photo

Rik


Last seen: 1 día hace Con actividad desde 2017

E-mails with feedback/questions about FEX submissions are welcomed. In general I will post e-mails about Answers on the related page, unless there is good cause not to do so.

Statistics

All
  • Treasure Hunt Participant
  • MATLAB Central Treasure Hunt Finisher
  • 36 Month Streak
  • Ace
  • Cody 10th Anniversary 10-Day Streak
  • Promoter
  • 5-Star Galaxy Level 5
  • GitHub Submissions Level 3
  • Draw Letters
  • Community Group Solver
  • Indexing I Master
  • Cody Challenge Master

Ver insignias

Content Feed

Respondida
Read excel file with number and text
If you use the third output of xlsread you will get a cell array. If any row or column is entirely empty it may be omitted. T...

5 días hace | 0

Respondida
change an image from rectangular to square by adding white area
The documentation for padarray states it will pad with 0. If you don't want that, you will have to provide the value as the thir...

11 días hace | 1

Respondida
Index in position 2 exceeds array bounds. Index must not exceed 7?
Since i and j both range from 1 to the number of rows in f, there is no reason i+j will be less than the number of columns in f....

11 días hace | 0

| aceptada

Respondida
Swap k elements in an n x1 vector
Create a logical vector with at most c true elements. Then permute the values at those positions and use logical indexing to sto...

11 días hace | 0

Respondida
Each time you run the program, a new.msh file is generated
You can use the tempname function to generate a random file name. You can also use sprintf to compose a file name that includ...

13 días hace | 0

| aceptada

Respondida
Incorrect Inputformat for datetime function
If you remove the quotes in your input format it should work. Since there are no quotes in your input text, you don't need them....

18 días hace | 0

Respondida
How do I using logical values to write 'NAN' to non-existing data?
You can use ismember: A=[ones(5,2).*[0 2] (-90:-86).']; B=[ones(4,2).*[0 2] [-90;-89;-87;-86]]; new_B=nan(size(A)); [~,row...

20 días hace | 0

| aceptada

Respondida
Multiplying individual columns of a matrix
You need to index ytrain the other way around, not ytrain(:,n), but ytrain(n,:).

22 días hace | 1

Respondida
When loading .csv it separate the column on " " and not ",". How to fix this?
You should really read the documentation, which will show you how to use the 'Delimiter' option (and the NumHeaderLines option)....

27 días hace | 0

| aceptada

Respondida
How permutate 2-by-2 matrices in a single matrix
You're close. You just need to store a, b, and c in a cell array and use perms to create indices. The benefit of this approach ...

alrededor de 1 mes hace | 0

Respondida
Subtracting values form rows with same variable
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). It...

alrededor de 1 mes hace | 0

| aceptada

Respondida
How do I perform a formatted read on exponential data?
Edit at the top: You can get the data in this format with my readfile function, or with data=cellstr(readlines(filename));. T...

alrededor de 1 mes hace | 0

Respondida
Acess all last array elements withtin cells
Loops are faster than cellfun (excluding the legacy syntax). The reason is that cellfun will hide the loop internally and you ha...

alrededor de 1 mes hace | 0

Respondida
Find the desired row in the matrix
Inspired by the answer and comment by Jan, I gave it a try as well. However, at least for this size, the answers from Jan are fa...

alrededor de 1 mes hace | 1

Respondida
How to plot x = 1 without any y variable
doc xline

alrededor de 1 mes hace | 0

Respondida
fprintf modifying txt file in the wrong way
If it's a sufficiently old program, it might expect a carriage return along with a line end. I would suggest reading the file...

alrededor de 1 mes hace | 0

Enviada


regexp_outkeys
Regexp with outkeys in old releases

alrededor de 1 mes hace | 1 descarga |

Respondida
Error in using an element in a matrix as function input
You need to pass the entire array, or treat each element as a separate variable. You can of course create the c array inside you...

alrededor de 1 mes hace | 1

| aceptada

Respondida
how do I generate a random signal with each point being -1 or +1 in MATLAB
randi([0 1],1,N)*2-1 That should do it. Or even this: sign(rand(1,N)-0.5) Although it is possible that generates a ...

alrededor de 1 mes hace | 1

| aceptada

Respondida
What will be the regex for this type of string?
expr = 'V/d*_/d*_/d*'; Or, if 'any' actually means '1 or more': expr = 'V/d+_/d+_/d+';

alrededor de 1 mes hace | 0

Respondida
Convert list of points into string and group it in tens
I would suggest putting each section in a cell, so you can easilly add the headers: points = randi(10,36,2); PointsPerSection ...

alrededor de 1 mes hace | 0

| aceptada

Respondida
Diary command does not capture command window results from a script file.
Even setting a full path for the diary file didn't work. DiaryFileName = fullfile(tempdir,'myFile.txt'); diary(DiaryFileName) ...

alrededor de 1 mes hace | 0

Respondida
How to perform different task on one single button pushed one by one to perform one by one task
You can use a persistent variable to keep track of the number of times the callback was called: persistent NumberOfCalls if is...

alrededor de 1 mes hace | 0

Respondida
Fast binary decoding of very large matrix of uint8s
It might not be the absolute fastest method, but this should be about 3 times faster x=uint8(randi(256,1e7,40)-1); tic y1 =...

alrededor de 1 mes hace | 0

| aceptada

Respondida
Error evaluationg 'OpenFcn' because of a waitfor command
You need to use return instead of guidata(hObject,handles) if the figure no longer exists. If you want more specific advice, yo...

alrededor de 1 mes hace | 0

| aceptada

Respondida
Indexing 3D arrays using vectors of indexes
The problem with indexing in Matlab is that it will grab every pair of indices, which is not always what you want. The easies...

alrededor de 1 mes hace | 0

| aceptada

Resuelto


Create cell array of numeric arrays
Convert the input to a cell array, but only if necessary. If the input is a numeric array, return a 1-by-1 cell array contain...

alrededor de 2 meses hace

Resuelto


Low level NaN
* I have a dataset. Columns represents different variables. * A variable may start with NaN or any double type number. * If i...

alrededor de 2 meses hace

Resuelto


Get me!
Inspired by Now! problems. Do your best!

alrededor de 2 meses hace

Resuelto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

alrededor de 2 meses hace

Cargar más