Respondida
Why are my images not displaying correctly?
First, you need to learn to vectorise code, the lines: for i=1:x for j=1:y g(i+1,j+1)=f(i,j); end end can ...

más de 7 años hace | 0

Respondida
Separate one column in an imported matrix
The way I'd do it: t = readtable('test11_1.txt'); %import as table t.PointIDs = rowfun(@(s) sscanf(s, '%f,', [1 Inf]), t, 'In...

más de 7 años hace | 1

| aceptada

Respondida
Create vertex with edges.
Your question is so vague that it's impossible to answer it properly. The only thing we can do is point you to the <https://...

más de 7 años hace | 0

| aceptada

Respondida
I need help with this question
Well, have you tried to run your code? There's a syntax error on the first line that you can correct yourself easily. Once you'v...

más de 7 años hace | 0

Respondida
Import function automatically converting the datenum values
Your attempt, |datetime(opts,'InputFormat', 'dd/MM/yyyy hh:mm');| tries to convert the import options to datetime which of cours...

más de 7 años hace | 2

| aceptada

Respondida
I have finished my script but i want to simplify it instead of leaving it looking cluttered, I am mainly looking for a shortcut.
Cluttered! What would you do if you had to plot the values from 0 to 10,000? Copy/paste the same lines 10,000 times and edit the...

más de 7 años hace | 0

Respondida
Stuck on rewriting program to use nested if constructs
For reference, one way to do this in matlab without any |if| at all, in just one line: fun = x.^(1 + (x<0)) + y.^(1 + (y<0)...

más de 7 años hace | 0

Respondida
Image Processing with data of type single
Despite your statement, at some point, the image must have been converted from integer type to single, and the conversion wasn't...

más de 7 años hace | 0

Respondida
How to change data type of table in matlab
Really, you should change the way you store your data in the spreadsheet. As it is you're losing most of the benefit of the spre...

más de 7 años hace | 1

| aceptada

Respondida
String variables in uitable
Note: since R2016b, string is a proper matlab type, delimited by double quotes |"|. What you have are char arrays. In parti...

más de 7 años hace | 0

Respondida
Error using +. Matrix dimensions must agree
The error message is very clear, you're trying to add two matrices of different size, which is never possible. Since |b1| is a 1...

más de 7 años hace | 1

| aceptada

Respondida
Extracting data in specific time intervals
Since it appears your data is stored in a timetable, the simplest way would be to call <https://www.mathworks.com/help/matlab/re...

más de 7 años hace | 1

Respondida
Why Matlab can't read .csv or .mat files?
On your windows computer, I suspect that you have a |table.m| file somewhere on your path shadowing the built-in table class. Ge...

más de 7 años hace | 3

| aceptada

Respondida
Error while opening matlab GUI
Right now, the error you're getting is from line 66: set(handles.dataSetPopUp,'String',mat2cell(1:8)); and matlab is tel...

más de 7 años hace | 0

Respondida
How to create a for loop where is if condition for each n-th value in i
First, let me say that the proper way to code your algorithm is without a loop an I'll show how to do that at the end. Even with...

más de 7 años hace | 0

Respondida
I have a cell array of 13 x 13 cells and every cell contains 16 x 16 double. How i can convert the full cell array into matrix of 208 x 208 ? Thanks in advance.
Your question is very puzzling: * You already know the answer to it, you've already written the code to do it, it's simply: ...

más de 7 años hace | 1

Respondida
drop down return to the first option
If you're using a |uidropdown| in app designer, at the end of your callback, after you've emitted your sound, set the dropdown <...

más de 7 años hace | 0

| aceptada

Respondida
How to return corresponding element in two same same size matrices
Your |x(YRow)| doesn't work because matlab doesn't know that you want element |YRow(1)| to be taken in the first column, |YRow(2...

más de 7 años hace | 0

| aceptada

Respondida
My answers are displayed in index form, how do I remove this?
format longg or format shortg should avoid displaying numbers in exponential form (this has nothing to do with ind...

más de 7 años hace | 0

| aceptada

Respondida
Why does image function always delete tag of axes control ?
I gave a thorough explanation in a <https://uk.mathworks.com/matlabcentral/answers/428478-get-coordinates-from-image-imagesc-in-...

más de 7 años hace | 1

| aceptada

Respondida
How can I randomly select words from a column without replacement?
Use |randperm| properly. |randperm(x, 1)| is the same as |randi(x)| and of course if you do that 3 times, there's no guarantee y...

más de 7 años hace | 0

Respondida
Average every 6hrs of hourly values - one month of data with missing data
Assuming that |readtable| detects the format of your file properly, it would be as simple as: t = table2timetable(readtable...

más de 7 años hace | 0

| aceptada

Respondida
How to move files with name containing 1,7,13, 1+6n to a new folder?
_I have no clue how to perform it_ Well, neither do we until we start to think about the problem, deconstruct it into steps a...

más de 7 años hace | 0

| aceptada

Respondida
Use c Code in Matlab and deal with pointers
I know nothing about coder but I don't understand why you're structured your current code the way it is. From the C-code point o...

más de 7 años hace | 0

Respondida
How to save segmented images into different folders?
Well, clearly the code you wrote has a bug but it's hard for us to tell you the problem if you don't show us the code. It is ...

más de 7 años hace | 1

| aceptada

Respondida
Import and plot file with day and time information
I'm not sure what you're doing wrong since you haven't shown us what you're doing. The following may be what you're after: ...

más de 7 años hace | 2

| aceptada

Respondida
Slice along a curved plane
_how can I get a slice along a curved plane_ Just pass a matrix of location for your x and y slice location instead of fixed...

más de 7 años hace | 0

Respondida
How to sum the values from multiple arrays with the same dimensions?
Use + ? result = array1 + array2 + array3 + array4; %of course using the actual names of the arrays However, it sounds ...

más de 7 años hace | 0

| aceptada

Respondida
Get coordinates from image (imagesc) in guide
There are two parts to your problem. The first reason you see this behaviour is because you're using the <https://www.mathwor...

más de 7 años hace | 1

| aceptada

Respondida
How can I edit the output of xlsread to make each column of the Excel file a single variable in a structure?
Note: Use |~| to ignore a function output instead of creating a |dummy| variable. So: [~, myName] = fileparts(files(k).nam...

más de 7 años hace | 0

Cargar más