Find Out Values of Variables Using MATLAB

$19.00$11.00699 reads

Question

Given two variables A and B, swap their values. You should not assume that you know what the values in A and B are, or even that they’re scalar values.

  1. Hint: You will need a 3rd, temporary variable
  2. Test your script with A = [4 5 2] and B = [6 1 7 9]
  3. Print out the values of A and B before the swap using fprintf.
  4. Print out the values of A and B after the swap using fprintf.

 

Summary

This question belongs to MATLAB software and discusses about application of MATLAB in mathematics to find out values of two given variables.

 

 

 

 

Add to Cart