How do I fix "Unrecognized function or variable" error?

Here is a part of code for fractal image compression and I am getting "Unrecognized function or variable 'create_transform'" error. How do I fix it?
Unrecognized function or variable 'create_transform'
Error in FIC_1 (line 101)
[temp_scale, temp_mse, temp_average] =
create_transform(original_input_image, row, column, range_size);
for row = 1:range_size:original_height
for column = 1:range_size:original_width
if fractal_mse(row, column) <= mse_tolerance && ...
fractal_mse(row,column+half_range_size) <= mse_tolerance && ...
fractal_mse(row+half_range_size,column) <= mse_tolerance && ...
fractal_mse(row+half_range_size,column+half_range_size) <= mse_tolerance
% Transforms for row and column
[temp_scale, temp_mse, temp_average] = ...
create_transform(original_input_image, row, column, range_size);
if temp_mse <= mse_tolerance
fractal_scale(row, column) = temp_average;
fractal_mse(row, column) = temp_average;
fractal_average(row, column) = temp_average;
fractal_size(row,column) = range_size;
fractal_filled(row,column) = 1;
fractal_filled(row,column+half_range_size) = 0;
fractal_filled(row,column+half_range_size) = 0;
fractal_filled(row+half_range_size,column)= 0;
fractal_filled(row+half_range_size, column+half_range_size) = 0;
end
end
end
end

3 个评论

As far as I can tell (from searching mathworks.com), there is no built-in MATLAB function called create_transform. Are you using some MATLAB code you got from somewhere else? If so, you may need to set your path appropriately.
Thanks for your response, I found it in a book, I made a seperate function in a seperate matlab file and then trying to call this function.
%% Create_Function
function finalanswer = create_transform(original_input_image, row, column, range_size)
end
Now I am getting this error.
Error using create_transform
Too many output arguments.
Error in FIC_1 (line 104)
create_transform(original_input_image, row, column,
range_size);
I will apreciate your help making this function.
Thanks, I fixed it.
%% Create_Function
function [temp_scale, temp_mse, temp_average] = create_transform(original_input_image, row, column, range_size)
temp_scale = 0;
temp_mse = 0;
temp_average = 0;
end

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by