Why do I get errors when changing the frequency of a radar system in the radar toolbox?

4 次查看(过去 30 天)
Whenever I change the frequency of a synthetic aperture radar (SAR) system I am attempting to model in the radar toolbox from the specified defult value of 10.0 GHz to 9.5 GHz, I get errors that prevent the program from running. As a Matlab novice, I am having difficulty understansing the errors and how to correct therm.
Below are the errors outputted:
Error using xline (line 35)
value must be nonempty
Error in AirborneSARSystemsDesignExample>helperPlotStripmapMode (line 167)
xline(striplenv(stripidx),'-.',{[num2str(round(striplenv(stripidx),2)),' m']}); % Selected synthatic length
Thanks in advnce for any assitance that can be reendered using the most detailed explanations that can be provided by a radar systems person , as I am just learning to use your software.
John

回答(1 个)

Amish
Amish 2024-5-27
Hi John,
The errors you're encountering seem to be related to the plotting functions in MATLAB, specifically with the use of xline within a script or function that is part of the Airborne SAR Systems Design Example.
The error messages suggest that there's an issue with the value being passed to xline, which is expected to be nonempty. This function is used to draw a vertical line on a plot at a specified x-coordinate. The error suggests that the variable or expression provided to xline evaluates to empty ([]), which is not allowed. This is coming from a specific snippet of your code that attempts to call xline with a certain value and additional parameters for styling and annotation.
Since I do not have access to your code, I suggest that you use MATLAB's debugging tools to step through the code, especially around the problematic line and inspect the values of striplenv, stripidx, and any other relevant variables to understand why the result is empty.
Additionally, you may also add a validation check in your code as follows: (This will help prevent the errors and make debugging easier)
if ~isempty(striplenv(stripidx))
xline(striplenv(stripidx), '-.', {[num2str(round(striplenv(stripidx),2)),' m']}); % Selected synthetic length
else
warning('Strip length value is empty. Skipping xline plot.');
end
Additonally, you can refer to the following documentation for more information about the xline function: https://www.mathworks.com/help/matlab/ref/xline.html
Hope this helps!
  1 个评论
John
John 2024-6-14
Thank you for your reply and explanation. However, the code is not mu own. You should have access to it since it was written by Matlab for use with the radar toolbox. Additionally, the real problem, as I see it, is that the example code from the radar toolbox, as written by Matlab, is hard-coded and only works for the examp[le radar file by Matlab. Once certain parameters are changed, in accordance with the specific radar being worked on, the hard-coded program no longer works, and produces errors like the one I wrote in about.
In order to correct those errors, one has to be very fluent in Matlab, which i am not. That is the problem. I have to seek the assistance of a Matlab expert to help me correct the errors outputted. If someone spends $$$ on a Radar Toolbox, it should be expected to run properly even if the parameters on a given example are modified or changed. Instead what we have are examples that are hard-coded and which require recodeing in order to get to run properly. What's the sense? Thank you. John

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Environment and Clutter 的更多信息

标签

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by