Réponse apportée
How to convert time to a number?
use following code to get values as string array. time=input(prompt,'s'); split the output 'time' using split function with de...

plus de 6 ans il y a | 0

A résolu


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

plus de 6 ans il y a

Question


why 'colormap' did not change the color of my plots?
example: figure, plot(rand(5)) colormap hot above code did not change the color of plot.

plus de 6 ans il y a | 2 réponses | 0

2

réponses

Réponse apportée
Extracting Slices From Slice Function
use the vector slicing to get one slice, Let V is the input volume. e.g S=V(:,:,1); use 'imshow' or 'imagesc' functions to vie...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Help with Loops and Switch cases and Mean
here is the code Q=input('Would you like to enter a real number? (Yes or No) ','s'); n=[]; switch Q case 'Yes' ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to shift a matrix
loop version: M=[ 1,2,3; 4,5,6; 7,8,9; ]; C=nan(3,4); for i=1:size(M,1) if mod(i,2)==1 C(i,2:end)=M...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to upload csv. files from multiple folders
to automate the file and folder access operations, do not use 'uigetfile' or 'uigetdir' functions. use 'dir' function to get th...

plus de 6 ans il y a | 0

Réponse apportée
How to access data from a struct when the dot notated reference is passed as a char array?
To to get the field names of struct array, use 'fieldnames' function S.x=1; S.y=2; fields = fieldnames(S) then, to get the...

plus de 6 ans il y a | 0

Réponse apportée
Question about import a .txt file into matlab
you can use 'fopen' and 'fread' functions. https://www.mathworks.com/help/matlab/ref/fread.html

plus de 6 ans il y a | 0

Réponse apportée
wirte in excel sheet.
Delete the already created excel sheet. Change the last line of code to xlswrite('Book1.xlsx',q,'A1:BI1') if you want to stor...

plus de 6 ans il y a | 0

Réponse apportée
Problem with data saving in a for loop
Best solution is: store the output variable 'vector' fom each iteration, into another variable(array, cell array). then at the ...

plus de 6 ans il y a | 1

Réponse apportée
Problem with data saving in a for loop
you have to put the 'xlswrite' functions inside the for loop. also, for each iteration, change the sheet number or the 'xlRange...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Create lookup table for cell array
Code example to convert cell array to table. A={1,2,3} B=array2table(A');

plus de 6 ans il y a | 0

Réponse apportée
I need to make a square wave
see: https://in.mathworks.com/help/signal/examples/signal-smoothing.html https://in.mathworks.com/matlabcentral/answers/3205...

plus de 6 ans il y a | 0

Réponse apportée
sir,i would like to implement pso (particle swarm optimization)in speech could you please help
particle swarm optimization code https://in.mathworks.com/matlabcentral/fileexchange/52857-particle-swarm-optimization-pso you...

plus de 6 ans il y a | 0

Réponse apportée
Creating shapes in binary images
you can insert a shape in a image using the function 'insertShape'. e.g. RGB = insertShape(I,shape,position);

plus de 6 ans il y a | 0

Réponse apportée
Hovering mouse over a variable suddenly doesn't show present value in R2015b?
I got this issue in matlab 2018a. I found that one of my variable name is 'eval'. 'eval' is an inbuild function name, so i chang...

presque 7 ans il y a | 3

A résolu


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

environ 7 ans il y a

A résolu


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

environ 7 ans il y a

Réponse apportée
join close lines in one thicker
why matlab did not have functions to draw and burn basic shapes (line, triange,..) in image.i did not find any file exchange als...

environ 7 ans il y a | 0

Chaîne


test channel
test data

environ 7 ans il y a

A résolu


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

plus de 7 ans il y a

A résolu


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

plus de 7 ans il y a

A résolu


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

plus de 7 ans il y a

A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

plus de 7 ans il y a

A résolu


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

plus de 7 ans il y a

A résolu


Is my wife right?
Regardless of input, output the string 'yes'.

plus de 7 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

plus de 7 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 7 ans il y a

A résolu


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

plus de 7 ans il y a

Charger plus