Answered
Output argument <XX> (and possibly others) not assigned a value in the execution with <YY> function
The error is simple. In the given function: function [h]=getColorHist(im, color_table, opt) im = rgb2hsv(im); [ht...

4 years ago | 0

| accepted

Answered
Save convhull as a stl file
https://in.mathworks.com/matlabcentral/fileexchange/20922-stlwrite-write-ascii-or-binary-stl-files Use the above function.

4 years ago | 0

| accepted

Answered
change color of words in matlab figure text
Two options: USe GUI (matlab's figure) . Go to edit, insert text box, add the word, change the font color and size etc. Read ...

4 years ago | 0

Answered
Its showing Not enough input arguments. Error in sum2 (line 2) m(:,3) = m(:,1) + m(:,2);
I think you are running the code/ function straight away using hit button or F5 key. You are not supposed to do that. You need t...

4 years ago | 0

Answered
How can I train a VDSR model with Thermal (or Grayscale) images?
Offcourse it is possible. You can go ahead with your images with that example. If you are stuck you are welcome with your questi...

4 years ago | 1

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
This is a pretty simple error. You are trying to save more number of elements in an array than it is initilaized for. EXample...

4 years ago | 0

Answered
how to sort indexes in a list base on distances
You may take this demo example: % Make random data (I chose random circular points) N = 50 ; th = linspace(0,2*pi,50)'; idx...

4 years ago | 0

| accepted

Answered
how to convert multiply jpg files to tiff
jpgFiles = dir('*.jpg') ; % you are in the folder of all jpg files/ you may provde path as well N = length(jpgFiles) ; for i ...

4 years ago | 0

| accepted

Answered
make plot in matrix data
Try: plot(x',y')

4 years ago | 0

| accepted

Answered
cosine estimate taylor series
x = 45*pi/180 ; n = 10 ; thesum = 0 ; for i = 0:n thesum = thesum+(-1)^i*x^(2*i)/factorial(2*i) ; end [cos(x) thesu...

4 years ago | 0

Answered
for loop save variables as matirx
list=dir('C:\Users\pc\Desktop\*.xlsx'); leng=length(list); name=cell(leng,1); for i=2:leng name{i} = list(i).name en...

4 years ago | 0

Answered
Create a function that generates different periodic signals
I will show one, you may try the others. Check the code though. Is the plot looks like is what you expected? t = 0:0.01:10 ;...

4 years ago | 0

| accepted

Answered
How to make a matrix from a vector?
v = [1 2 3 4] ; iwant = repmat(v,6,1)

4 years ago | 0

Answered
How can I check if two variables return the same value?
If A and B are floatinng point numbers (which are mostly), then you cannot use A == B. In this case to comapre them fix a tolera...

4 years ago | 0

Answered
How to find four solutions for a cycloid and trochoid
t = linspace(0,10,1000) ; cycloid=[2*(t-sin(t)) ; 2*(1-cos(t))] ; trochoid=[2*t-sin(t); 2-cos(t)] ; % Get Intersections ...

4 years ago | 0

Answered
Creating a curved triangular heatmap .
You need not to use delaunayTriangulation. Your grid is already a structured grid and you can striaght away plot using pcolor. Y...

4 years ago | 1

Answered
how can I find this infinite sum?
k = 1 ; f = 0 ; N = 100 ; % choose a big number for n = 1:N f = f+1/(2*n+1)^5*tanh((2*n+1)/2*pi*k) ; end f = 192/...

4 years ago | 0

Answered
How to draw a ball by plot3?
m = 100; n = 100; p = 100 ; [X,Y,Z] = ndgrid(-m:m,-n:n,-p:p) ; x = X(:) ; y = Y(:) ; z = Z(:) ; r = sqrt(x.^2+y.^2...

4 years ago | 0

Answered
Explain this line of code (Index)
L = 2400 ; % a number i = ceil(L*rand(1)) % ceil(rand(1)) always gives 1 x = periodic_index(i, L, 1); % From periodic_in...

4 years ago | 0

Answered
how to plot cell array with contains another cell array
Convert the cell array into matrix using cell2mat and then plot.

4 years ago | 1

| accepted

Answered
Reading string formatted Date and Time from CSV
REad about readtable.

4 years ago | 0

Answered
Find sphere fit on binary matrix
load('matrixfit.mat') [m,n,p] = size(tumor3) ; [X,Y,Z] = ndgrid(1:m,1:n,1:p) ; k = tumor3(:) ; x = X(:) ; y = Y(:) ...

4 years ago | 0

| accepted

Answered
for loop append variable
You can make it a cell array. leng=length(list) nl = cell(leng,1) ; for i=1:leng nl{i}=list(i).name end You may acce...

4 years ago | 0

| accepted

Answered
How do I vary color along a 2D line?
x = 0:.05:2*pi; y = sin(x); z = y; patch([x nan],[y nan],[z nan],[z nan], 'edgecolor', 'interp'); colorbar;colormap(jet);

4 years ago | 6

Answered
Changing certain values if they don't satisfy the requirements, if they do satisfy the requirements perform operations
Sut = [25000, 70000, 40000, 35000]; iwant = 19000*ones(size(Sut)) ; % create new variable with all 19000 idx = Sut < 48000 ; %...

4 years ago | 0

| accepted

Answered
Trying to get plots from range of values
I have changed your code. You can plot the variables you want now. You need to read about linspace, element by element operation...

4 years ago | 0

| accepted

Answered
i want to store a 100 x 100 matrix in hi_i for each iteration of irs1 and irs 2 when my sij1*sij2' is of 100x100 multiplied by a scalar in h_i.
WE cannot correct your code as some variables are not defined. But still, your error is simple. You are trying to store a 100x10...

4 years ago | 0

Answered
How to use if function MATLAB?
prompt = {'Enter Name: ', 'Enter Age: '}; dlgtitle = 'Input Values'; answer = inputdlg(prompt,dlgtitle); name = answer{1}; ...

4 years ago | 0

Load more