A soumis


Random Integers With a Specified Sum and Range
Generate random integers with specified sum and parameters from various distributions.

plus de 4 ans il y a | 1 téléchargement |

0.0 / 5
Thumbnail

Réponse apportée
Asking about the rounding numbers. (Problem with rotating image)
I mentioned mapping from output back to input. Here is one crude example. This still uses no interpolation. inpict = imread('...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to convert .hdr image data set to .mat?
You can use multibandread() to read these types of data files. https://www.mathworks.com/help/matlab/ref/multibandread.html ...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
How can I create a function of my code
This probably covers what you are trying to do. I assume your problem description is as follows: You have a cell array of scal...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How can I crop a set of non-binary images automatically depending on the size and position of each image?
If the excess area is a solid color (you mentioned white), then I and ImageAnalyst mention multiple methods in this thread: htt...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to open extension .a00 and .sin image Using Matlab
Like KSSV says, use fread() fid = fopen('YourProjection (1).sin','r'); A = fread(fid,Inf,'*uint16'); fclose(fid); A = resh...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Stretch downsampled data to fit on same x axis
There are probably tools to do this in SPT, but I don't see why interpolation won't work. Fs = 2000 t = 500 ar1 = 1:1:Fs*t; ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
nearest(100*rand()) does not work
Yeah. The error is because you don't have Fixed-point Toolbox. You can either use Matt's suggestion above, or depending on w...

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Customize the background color in imagesc
If you're talking about the background of the image, that's determined by the image content and the colormap you're using. Sele...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
I want to design a Homework Problem Solver
Here's part of a solution: instr = 'Given P = 100 kpa, V = 2 litres, T = 273 K, R = 8.314 Solve for n.'; P = str2double(rege...

plus de 4 ans il y a | 0

Réponse apportée
Elementary matrices in Matlab
(EDIT to fix misread) Here's one way: n = 8; z = zeros(1,n-3); R = toeplitz([0 2 -1 z],[0 -2 1 z])

plus de 4 ans il y a | 2

Réponse apportée
Using if statement for switch
This is a simplified conceptual example of one way. % define a list of valid strings validforcestr = lower(["N" "lb" "oz" "kN"...

plus de 4 ans il y a | 0

Réponse apportée
MATLAB can't read files and run the code. The error says that file doesn't exist
I'm going to take a blind shot and guess that your path doesn't actually have two nested directories of the form ...MatlabCode...

plus de 4 ans il y a | 0

Réponse apportée
I am getting an error 'Index in position 2 is invalid. Array indices must be positive integers or logical values.' please help ? Thanks in advance.
Using round() to generate array indices does not guarantee that the results are within [1 size(A,thisdim)]. In this case, the c...

plus de 4 ans il y a | 0

Réponse apportée
Can I recreate this using commands?
Here's one way using implicit array expansion. L = 4; D = 2; % using a loop o = 0; for i = 1:D for j = 1:D ...

plus de 4 ans il y a | 1

Réponse apportée
How to do these legends/colorbar?
If you're asking how to get that colormap applied to a line plot, then you can use the axes 'colororder' property. If you want ...

plus de 4 ans il y a | 0

Réponse apportée
Divid 3D space into grid of n x n x n
Something like this? This returns three 3D arrays which uniformly increment in steps of 3, from 1 to 10. [xx yy zz] = ndgrid(1...

plus de 4 ans il y a | 0

Question


Using regexprep to clean up MATLAB code formatting
I was trying to put together something to fix operator spacing in a bunch of old .m files. I'm reducing this problem example to...

plus de 4 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
Why can't I generate a sphere with a material?
Set up the lights. [X,Y,Z]= sphere(20); x2 = X.*50; y2 = Y.*50; z2 = Z.*50; h = surf(x2,y2,z2); light('Position',[1 3 2]);...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Error using insertText Expected input number 1, I, to be one of these types: uint8, uint16, int16, double, single
The first argument to insertText() is an image array. You aren't providing that. https://www.mathworks.com/help/vision/ref/ins...

plus de 4 ans il y a | 0

Réponse apportée
Why is my 3d plot blank if the vectors are not empty?
The reason why the plot looks like nothing (or just like a tiny speck) is because the plot is a straight line that just happens ...

plus de 4 ans il y a | 0

Réponse apportée
How to calculate an average of each 24 numbers in the same serie.
Assuming you want this to be done blockwise, here's one way: v = 1:20; bkavg = mean(reshape(v,5,[]),1) @Image Analyst has a p...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How do I do Edge detection with filling the holes?
edgefr = edge(graybg,'Sobel'); % this is your variable name BWBW = bwareaopen(imfill(edgefr,'holes'),20); % wrong variable name...

plus de 4 ans il y a | 0

Réponse apportée
Textscan issues while from file
I have no idea what this data is, but I'm going to guess that reading every other value into two vectors makes no sense. Since ...

plus de 4 ans il y a | 0

Réponse apportée
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 15-by-7-by-6.
k_nanopcm and T_nanopcm are the same size (15x7x6). In this assignment, the LHS is a scalar. The RHS is a function of a bunc...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to eliminate a color range from certain colormap?
Old, I know ... If you want to break the circularity of hsv(), you can do so by doing the interpolation yourself: z = peaks(10...

plus de 4 ans il y a | 0

Réponse apportée
how to sum each element in vector
a = 1:1:10; % you could do it with a loop s = zeros(1,numel(a)); s(1) = a(1); for i = 2:numel(a) s(i) = s(i-1) + ...

plus de 4 ans il y a | 0

Réponse apportée
how can I break up a number into its separate digits
I'm sure I've seen more elegant ways, but off the top of my head, I don't remember. EDIT: ... oh. I'm assuming we're talking a...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Generate a numerical series
This is one way: k = -8:-1:-14; v = 10.^k fprintf('%g\n',v.') % for sake of clarity

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
*.* and %s meaning in MATLAB
In an expression like v = 'words'; fprintf('this is a progression of several %s\n',v) %s specifies "string or character vect...

plus de 4 ans il y a | 0

| A accepté

Charger plus