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

3 views (last 30 days)
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

Answers (1)

Amish
Amish on 27 May 2024
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 Comment
John
John on 14 Jun 2024
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

Sign in to comment.

Categories

Find more on Environment and Clutter in Help Center and File Exchange

Tags

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!