Answered
Merge tif files?
You can use imread to read each .tif file. Then concatenate the data or otherwise combine them into a single array as desired. T...

5 years ago | 0

Answered
flipped indexes in 3D array
Notice the documentation for surf states that input argument X is "x-coordinates, specified as a matrix the same size as Z, or a...

5 years ago | 0

Answered
Undefined function 'mtimes' for input arguments of type 'matlab.graphics.chart.primitive.Histogram'.
Right now, h1 and h2 are Histogram objects, and it doesn't make sense to multiply two histogram objects. This is what the error ...

5 years ago | 0

| accepted

Answered
Converting a cell array to a multidimensional array
AA = cellfun(@(x)x.',A,'UniformOutput',false); % transpose each element of A B = cat(3,AA{:}); % concatenate along the third di...

5 years ago | 0

| accepted

Answered
Grid search and grid plot with colours
surf(X,Y,zeros(size(X)),AC,'EdgeColor','none','FaceColor','interp'); set(gca(),'View',[0 90]); set(gcf(),'Colormap',flip(gray...

5 years ago | 0

| accepted

Answered
incorrect argument for input size
Like the message says, there is no 'InputSize' property of a layerGraph. But an imageInputLayer does have an 'InputSize' propert...

5 years ago | 0

| accepted

Answered
Convert data form .txt file into .mat file
Each time through the loop data contains the data from the current file, so that when you do save, only the current file's data ...

5 years ago | 2

| accepted

Answered
How to make a recursive call to a function using output values stored in a array?
I know you're asking about a recursive call, but I don't think you need a recursive call here because the u calculated one time ...

5 years ago | 0

| accepted

Answered
Change color of the output string in GUI by command
As far as I know there is no 'text' property of uicontrols. I think you mean to get the 'Value' property. That's one problem. T...

5 years ago | 1

Answered
How to concentate multiple audio signals in to one instance
The loop only gives you the last signal because you overwrite concattedsignal each time. You need to use concattedsignal in the ...

5 years ago | 0

Answered
Does my for looop make sense?
The loops make sense, and the lines look good. The texts could use some adjustment in two aspects: 1) Note that the text label...

5 years ago | 0

| accepted

Answered
reading data from excel text not displayed
I believe that the variable 'everything' should have everything. If you don't need the numeric-only and text-only outputs from ...

5 years ago | 0

| accepted

Answered
deleting rows in a matrix according to the sorting of some certain column values
In case there are more than two rows that match the criteria, I'm going to assume you want to delete just the one row with the l...

5 years ago | 0

Answered
Having trouble with invalid frequency value of the colourmap for Scatter plot
afhist has at least one element which is zero. Zero is not a valid index in MATLAB, so you cannot use afhist as an index as it i...

5 years ago | 0

Answered
I'm not sure how to fix this error Warning: Integer operands are required for colon operator when used as index. > In demo (line 147)
This is probably due to the fact that Nsamps is odd, so that Nsamps/2 is not an integer, so that this line: y_fft = (y_fft(1:Ns...

5 years ago | 0

| accepted

Answered
How to interrupt file operations with a GUI callback function?
If for whatever reason you cannot follow either of @Walter Roberson's suggestions in his answer, it might be worthwhile to consi...

5 years ago | 0

| accepted

Answered
unrestricted in sign meaning
Seems right.

5 years ago | 0

| accepted

Answered
Make database of images in Matlab
db = struct( ... 'image1',rand(50,50,3), ... 'image2',rand(100,100,3)); figure(); image(db.image1);

5 years ago | 0

Answered
Function not recognizing other function variable
In gibbs.m, the variable b is only assigned a value if T is at least 200 and not greater than 6000. if(200 <= T) && (T <1000) ...

5 years ago | 0

Answered
Trying to plot graph in a proper time series manner
time is the time of day, so it doesn't contain information about the date, only the hours, minutes, seconds within a day. In ord...

5 years ago | 0

| accepted

Answered
Overlay two images in subplot with different colormaps
This happens because when you do it without subplot, you are making two images in two separate axes, but when you use subplot, t...

5 years ago | 1

Answered
Unrecognized function or variable h.
This line: me(2500) = h*m*g says to set the 2500th element of the variable me equal to h*m*g. m is defined, but h and g are n...

5 years ago | 0

Answered
How to disable console output
If outputs are printing to the command window because of lines of code without semi-colons on the end, you can suppress those ou...

5 years ago | 0

Answered
Challanges representing hexadecimal values as "integer double" in uitable
Maybe using hex2dec instead of str2double will work: str2double('0x1234') str2double('0x123e') hex2dec('0x1234') hex2dec('0x...

5 years ago | 0

Answered
Combine scatter3 and trisurf plots?
subplot will give you a grid of axes. It sounds more like you want one axes with multiple graphics objects in it, in which case ...

5 years ago | 0

| accepted

Answered
Error I don't understand "undefined variable andre_tilgjengelig"
Your first if/elseif/elseif block looks like this: if forste_saltet==1 forste_tilgjengelig='NH4Cl'; elseif andre_saltet==...

5 years ago | 0

Answered
Triangle pyramid of numbers (0-9), but to return as output var.
See below for an example of how to do this with sprintf: function [res]=WORKI_05(number)%NUMBER IS UNSIGNED INTEGER(TRIANGLE HE...

5 years ago | 1

| accepted

Answered
How can I fix my for loop to iterate diagonally?
Assuming that N1 and N2 in the code should be A1 and A2 (so that M is a square matrix), the easiest way to set the values along ...

5 years ago | 0

Answered
How can I assign a number to a letter combination in matlab?
Let's say the initial table was a 2-D cell array of chars called t and you want to convert it to a matrix of doubles called y. ...

5 years ago | 0

| accepted

Answered
Is the following program correct
s=0; n=input("no of terms"); x=input("put the value of x"); for i=0:2:2*(n-1) s=s+(-1).^(i/2)*(x.^i)/(factoria...

5 years ago | 0

Load more