Réponse apportée
Random shuffle vector such that all elements fall in new index positions
I would: do a normal randperm that may map some elements back to their original location any element that has been mapped to ...

presque 7 ans il y a | 0

Réponse apportée
Trying to decrypt a message
tofind = '[a-zA-z#]' Read the regexp doc and its examples to learn how ranges work. You may want to add a quantifier to the e...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Index exceeds the number of array elements (0). Error in ROI_timecourse_DICOM_v2_0 (line 20) FullFileName = FileName(1:suffix(1)-5);
Most likely, strfind(FileName, '.') didn't find a . so suffix is empty and of course suffix(1) is invalid since index 1 is more ...

presque 7 ans il y a | 0

Réponse apportée
Convert Binary matrix to Double Value
Bearing in mind that for A = [0 0 0 0 0 0] B is just 0 and that above 16 bits you don't have enough precision in a double number...

presque 7 ans il y a | 0

Réponse apportée
Large, unused cell aray in memory still slows down calculation significantly
Well, with the cell array you're doing 2x44100 matrix allocations with zeros, which all have to be copied into a new complex mat...

presque 7 ans il y a | 0

Réponse apportée
When merging two tables, then restart the number of rows
No, as you've stated the row number is not part of the table, it's only there to help you in case you need to index the table ro...

presque 7 ans il y a | 0

Réponse apportée
How do I import and read multiple text files with the same name from different folders
datafolder = 'C:\somewhere\somefolder'; %your root data folder dataname = 'RESULTS_TRIALS.txt'; %replace with appropriate ext...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Getting cell array of structs to a usable form in R
destination_folder = 'C:\Somewhere\somefolder'; %change as appropriate filepattern = 'Drive%02d.csv'; %change pattern if need...

presque 7 ans il y a | 2

| A accepté

Réponse apportée
Monte Carlo Method Fails
Monte carlo works fine. Clearly you have a bug. Why are you shuffling (with randperm) each suit before concatenating them? Woul...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Remove elements from string array
One possible way: numericarray = double(yourstringarray); %convert string array to numeric. Text that can't be converted to nu...

presque 7 ans il y a | 0

Réponse apportée
How can I compute a point-by-point difference between a RAND and RANDN matrix?
"I honestly don't even know where to start, my instructor never went over what "seed" means" Have you tried searching matlab's ...

presque 7 ans il y a | 0

Réponse apportée
Select method of Worksheet class failed
I'm sure the author is vey good at her research but a good programmer she's not. Global variables in every single function, what...

presque 7 ans il y a | 0

Réponse apportée
How can I interpolate a data set given by 5 "inputs"?
TLDR: The Y and xq you've constructed work for scatteredInterpolant but not for griddedInterpolant which uses a different format...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Getting error for this code as Index in position 1 exceeds array bounds. Pls tell solution
Most likely, your image is smaller than 512x512. If that's not the problem then give us the entire text of the error message. ...

presque 7 ans il y a | 0

Réponse apportée
How to create another vector based on some if condition?
It's rare to have to use if in matlab, and it's certainly not the route to go if you want to operate on whole vectors or matrice...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
global variables in structure
Hopefully, you ]do not have any global variables. Global variables are typically a very bad idea. However, I think you're just ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
how to split data with 'or' condition ?
My recommendation would be not to split your data into cell arrays. You're complicating your life for no reason. First, you sho...

presque 7 ans il y a | 0

Réponse apportée
difference between x and 'x'
What a strange question! x is the variable you previously defined, so x*2 multiply the content of the variable by 2. 'x' is a ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Indexing Elements in an Array
Apart from a blackboard, I'm not aware of any language where a < b < c is the proper way to test if a number is between two oth...

presque 7 ans il y a | 0

Réponse apportée
how to remove zeros from the matrix?
A=[1, 0, 2, 0, 3 ; 0, 4, 0, 5, 0 ; 6, 0, 7, 0, 8]; B = reshape(nonzeros(A(:, 1:end-1).'), [], size(A, 1)).'

presque 7 ans il y a | 2

Réponse apportée
changing value in the center of an array
What's an LPF filter? Possibly, is it a Low Pass Filter filter? I don't understand what you're trying to achieve with this x_2...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How does one rotate the bottom half of an image 180 degrees while keeping the upper half the same?
Use indexing to get the half of your image that you want to rotate, e.g. assuming the height of your image is a multiple of 2 l...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
how can I edit a matrix and rename it at the same time?
Sorry, you're better off doing it in two lines. You want to copy the matrix into the new variable before changing it so: edited...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Copy the content of one table to an other table with different size
This is trivially done with outerjoin: mergedtable = outerjoin(yourbigtable, yourgroupcounttable, 'Keys', {'Time', 'radius'}, '...

presque 7 ans il y a | 2

| A accepté

Réponse apportée
OpeningFcn of AppDesigner Conversion?
I've no idea how the tool converts a GUIDE GUI into an App, but in App Designer all the initialisation code goes in the StartupF...

presque 7 ans il y a | 0

Réponse apportée
how can i change an indice in Matrix as vector?
First, probably the most important thing: numbered or sequentially named variables are always a very bad idea. they always make ...

presque 7 ans il y a | 2

Réponse apportée
somebody plz help me with this code. I got an error after run this code is subscript indices must either be real positive integers or logical.
%your code: left=find(difsig==1); raight=find(difsig==-1); So left and the mispelled raight are a vector of indices of di...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
how to use cell ?
If you're asking how to transform U into your desired F: F = cellfun(@num2cell, U, 'UniformOuput', false); would be one way of...

presque 7 ans il y a | 1

Réponse apportée
fill a boundary region with white colour
boundaries{2} is only two pixels, there's nothing to fill! Anyway, if all you want is to fill the region, then bwboundaries is ...

presque 7 ans il y a | 1

Réponse apportée
How to enforce element-wise condition in matrix operations?
Reposting my comment as an answer and adding a bit more to it. I'm unclear why you want to ignore the 0s in L and why you think...

presque 7 ans il y a | 1

| A accepté

Charger plus